diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b96606009..b8b7d05b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/Makefile b/Makefile index a94641616..94f35a7d3 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,20 @@ lint-type: .PHONY: test test_norecord test_novcr vcr_rerecord test: - coverage run -m py.test -v . + coverage run -m pytest -v . test_norecord: # error if VCR recording for a web request is missing (useful on CI) - coverage run -m py.test -v . --vcr-record=none + coverage run -m pytest -v . --vcr-record=none test_novcr: # disable VCR completely; useful to check if recordings are outdated - coverage run -m py.test -v . --disable-vcr + coverage run -m pytest -v . --disable-vcr vcr_rerecord: # clear VCR cassettes and run tests to record fresh ones rm -rf ./test/vcr/* - coverage run -m py.test -v . --vcr-record=all + coverage run -m pytest -v . --vcr-record=all .PHONY: coverage_report coverage_html coverages coverage_report: diff --git a/contrib/tox.ini b/contrib/tox.ini index ebcf3a424..975f5a0b4 100644 --- a/contrib/tox.ini +++ b/contrib/tox.ini @@ -2,12 +2,12 @@ package_root = . min_version = 4.3.3 envlist = - py{38,39,310,311}-qa + py{38,39,310,311,312}-qa skip_missing_interpreters = true ignore_base_python_conflict = true labels = - lint = py{38,39,310,311}-lint - test = py{38,39,310,311}-test + lint = py{38,39,310,311,312}-lint + test = py{38,39,310,311,312}-test [testenv] @@ -20,11 +20,13 @@ envname = py39: py39 py310: py310 py311: py311 + py312: py312 envdir = py38: {toxinidir}/.tox/py38 py39: {toxinidir}/.tox/py39 py310: {toxinidir}/.tox/py310 py311: {toxinidir}/.tox/py311 + py312: {toxinidir}/.tox/py312 depends = base deps = diff --git a/dev-requirements.txt b/dev-requirements.txt index c83774327..39c25f980 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -7,7 +7,7 @@ flake8-import-order flake8-type-checking; python_version >= '3.8' # Sphinx theme furo==2023.9.10 -pytest~=7.1.0 +pytest~=7.4 pytest-vcr~=1.0.2 requests-mock~=1.9.3 sphinx>=7.1.0,<8; python_version <= '3.8' diff --git a/docs/source/plugin/test.rst b/docs/source/plugin/test.rst index ce77501b4..a5e5f233e 100644 --- a/docs/source/plugin/test.rst +++ b/docs/source/plugin/test.rst @@ -33,7 +33,7 @@ Assuming your test files are in the ``test`` folder in your project directory:: You can run your test suite with:: - py.test -v test/ + pytest -v test/ .. __: https://docs.pytest.org/en/stable/getting-started.html diff --git a/pyproject.toml b/pyproject.toml index a5b9ac664..cff96f1ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools~=63.0", "wheel"] +requires = ["setuptools~=66.1", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools] @@ -39,6 +39,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Communications :: Chat :: Internet Relay Chat", ] requires-python = ">=3.8" diff --git a/sopel/tests/mocks.py b/sopel/tests/mocks.py index 94738d233..429fb68e0 100644 --- a/sopel/tests/mocks.py +++ b/sopel/tests/mocks.py @@ -108,7 +108,7 @@ class MockIRCServer: ``blocking`` arguments to the instance methods below. The :class:`~sopel.tests.factories.IRCFactory` factory can be used to - create such mock object, either directly or by using ``py.test`` and the + create such mock object, either directly or by using ``pytest`` and the :func:`~sopel.tests.pytest_plugin.ircfactory` fixture. .. versionadded:: 7.1 @@ -361,7 +361,7 @@ class MockUser: :param str host: user's host The :class:`~sopel.tests.factories.UserFactory` factory can be used to - create such mock object, either directly or by using ``py.test`` and the + create such mock object, either directly or by using ``pytest`` and the :func:`~sopel.tests.pytest_plugin.userfactory` fixture. """ def __init__(self, nick=None, user=None, host=None):