diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56e2671..b6f2252 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.x' - name: Ensure latest pip run: python -m pip install --upgrade pip @@ -87,20 +87,20 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.8", "3.9", "3.10", "pypy3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"] include: - os: ubuntu-latest python-version: "3.10" with-coverage: true - os: ubuntu-latest - python-version: 3.11-dev + python-version: 3.13 tox-env: devel - os: windows-latest - python-version: 3.11-dev + python-version: 3.13 tox-env: devel - os: macos-latest - python-version: 3.11-dev + python-version: 3.13 tox-env: devel steps: @@ -163,11 +163,11 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "pypy3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"] include: - python-version: "3.10" with-coverage: true - - python-version: 3.11-dev + - python-version: 3.13 tox-env: devel steps: @@ -233,9 +233,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "pypy3.9"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9"] include: - - python-version: 3.11-dev + - python-version: 3.13 tox-env: devel steps: diff --git a/pyproject.toml b/pyproject.toml index 2edb64f..27fc026 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "pytest-html" description = "pytest plugin for generating HTML reports" readme = "README.rst" license = "MPL-2.0" -requires-python = ">=3.8" +requires-python = ">=3.9" keywords = [ "pytest", "html", @@ -29,10 +29,11 @@ classifiers = [ "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Quality Assurance", diff --git a/start b/start index 3440913..da094b8 100755 --- a/start +++ b/start @@ -7,7 +7,7 @@ else fi if [[ "${1}" == "down" ]]; then - docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down + docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) down else - docker-compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d + docker compose -f <(sed -e "s;%%VOLUME%%;${volume};g" docker-compose.tmpl.yml) up -d fi diff --git a/testing/test_unit.py b/testing/test_unit.py index f82825c..1ea945e 100644 --- a/testing/test_unit.py +++ b/testing/test_unit.py @@ -1,9 +1,7 @@ import importlib.resources -import os import sys from pathlib import Path -import pkg_resources import pytest from assertpy import assert_that @@ -17,19 +15,13 @@ def run(pytester, path="report.html", cmd_flags=None): def file_content(): - try: - return ( - importlib.resources.files("pytest_html") - .joinpath("assets", "style.css") - .read_bytes() - .decode("utf-8") - .strip() - ) - except AttributeError: - # Needed for python < 3.9 - return pkg_resources.resource_string( - "pytest_html", os.path.join("assets", "style.css") - ).decode("utf-8") + return ( + importlib.resources.files("pytest_html") + .joinpath("assets", "style.css") + .read_bytes() + .decode("utf-8") + .strip() + ) def test_duration_format_deprecation_warning(pytester): diff --git a/tox.ini b/tox.ini index fdd8921..edc0f78 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = {3.8, 3.9, 3.10, 3.10-cov, pypy3.9}, docs, linting +envlist = {3.9, 3.10, 3.10-cov, 3.11, 3.12, 3.13, pypy3.9}, docs, linting isolated_build = True [testenv] @@ -56,7 +56,3 @@ extend-ignore = E203 [pytest] testpaths = testing -# TODO: Temporary hack until they fix -# https://github.com/pytest-dev/pytest/issues/6936 -filterwarnings = - ignore:.*TerminalReporter.writer attribute is deprecated.*:pytest.PytestDeprecationWarning