From a1d99e4bdd6effa2f2c9a50a2f4712e7fe1823d2 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 13:56:07 +0100 Subject: [PATCH 01/21] [pyproject.toml] Move information from setup.cfg to pyproject.toml --- .pre-commit-config.yaml | 5 ----- pyproject.toml | 50 +++++++++++++++++++++++++++++++++++++++++ setup.cfg | 31 ------------------------- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 032fe8c4d..ca3b41d58 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,11 +21,6 @@ repos: hooks: - id: blacken-docs additional_dependencies: [black==24.1.1] -- repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 - hooks: - - id: setup-cfg-fmt - args: ["--max-py-version=3.12", "--include-version-classifiers"] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 15a855ce6..6e3d3612a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,53 @@ +[project] + +name = "pytest" +dynamic = [ + "version", + "optional-dependencies", + "dependencies", + "scripts", + "requires-python" +] +description = "pytest: simple powerful testing with Python" +authors = [ + {name = "Holger Krekel"}, + {name = "Bruno Oliveira"}, + {name = "Ronny Pfannschmidt"}, + {name = "Floris Bruynooghe"}, + {name = "Brianna Laugher"}, + {name = "Florian Bruhin"}, + {name = "Others (See AUTHORS)"}, +] +readme = "README.rst" +license = {text = "MIT"} +keywords = ["test", "unittest"] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: Unix", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "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", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Testing", + "Topic :: Utilities", +] + +[project.urls] +Homepage = "https://docs.pytest.org/en/latest/" +Changelog = "https://docs.pytest.org/en/stable/changelog.html" +Twitter = "https://twitter.com/pytestdotorg" +Source = "https://github.com/pytest-dev/pytest" +Tracker = "https://github.com/pytest-dev/pytest/issues" + [build-system] requires = [ "setuptools>=45.0", diff --git a/setup.cfg b/setup.cfg index a1a47e1ba..bf981840b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,36 +1,5 @@ [metadata] -name = pytest -description = pytest: simple powerful testing with Python -long_description = file: README.rst -long_description_content_type = text/x-rst -url = https://docs.pytest.org/en/latest/ -author = Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others -license = MIT -license_files = LICENSE platforms = unix, linux, osx, cygwin, win32 -classifiers = - Development Status :: 6 - Mature - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - 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 - Topic :: Software Development :: Libraries - Topic :: Software Development :: Testing - Topic :: Utilities -keywords = test, unittest -project_urls = - Changelog=https://docs.pytest.org/en/stable/changelog.html - Twitter=https://twitter.com/pytestdotorg - Source=https://github.com/pytest-dev/pytest - Tracker=https://github.com/pytest-dev/pytest/issues [options] install_requires = From c3583dee0b274af84b56e70f270d3a42d0ce2463 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 14:02:06 +0100 Subject: [PATCH 02/21] [pyproject.toml] Translate 'metadata:platforms' to pyproject.toml --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index bf981840b..8707c6180 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[metadata] -platforms = unix, linux, osx, cygwin, win32 - [options] install_requires = iniconfig From 411c2cbf9d8f1e18aa4b7e53ff3d60790beacf1d Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 14:20:10 +0100 Subject: [PATCH 03/21] [pyproject.toml] Translate dynamic option to pyproject.toml --- pyproject.toml | 35 +++++++++++++++++++++++++++-------- setup.cfg | 24 ------------------------ 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6e3d3612a..38a9471e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,6 @@ [project] - name = "pytest" -dynamic = [ - "version", - "optional-dependencies", - "dependencies", - "scripts", - "requires-python" -] +dynamic = ["version"] description = "pytest: simple powerful testing with Python" authors = [ {name = "Holger Krekel"}, @@ -41,6 +34,32 @@ classifiers = [ "Topic :: Utilities", ] +dependencies = [ + "colorama;sys_platform=='win32'", + "exceptiongroup>=1.0.0rc8;python_version<'3.11'", + "iniconfig", + "packaging", + "pluggy>=1.4.0,<2.0", + "tomli>=1.0.0;python_version<'3.11'", +] +requires-python = ">=3.8" + +[project.optional-dependencies] +testing = [ + "argcomplete", + "attrs>=19.2.0", + "hypothesis>=3.56", + "mock", + "pygments>=2.7.2", + "requests", + "setuptools", + "xmlschema", +] + +[project.scripts] +"py.test" = "pytest:console_main" +pytest = "pytest:console_main" + [project.urls] Homepage = "https://docs.pytest.org/en/latest/" Changelog = "https://docs.pytest.org/en/stable/changelog.html" diff --git a/setup.cfg b/setup.cfg index 8707c6180..364db8d70 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,34 +1,10 @@ [options] -install_requires = - iniconfig - packaging - pluggy>=1.4.0,<2.0 - colorama;sys_platform=="win32" - exceptiongroup>=1.0.0rc8;python_version<"3.11" - tomli>=1.0.0;python_version<"3.11" -python_requires = >=3.8 package_dir = =src setup_requires = setuptools setuptools-scm>=6.0 -[options.entry_points] -console_scripts = - pytest=pytest:console_main - py.test=pytest:console_main - -[options.extras_require] -testing = - argcomplete - attrs>=19.2.0 - hypothesis>=3.56 - mock - pygments>=2.7.2 - requests - setuptools - xmlschema - [options.package_data] _pytest = py.typed pytest = py.typed From dab1583ce1ad9c08b64fefc632c9e3d900d4c3dd Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 15:27:53 +0100 Subject: [PATCH 04/21] [pyproject.toml] Remove setup_requires / package_dir in setup.cfg already exists --- setup.cfg | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 364db8d70..3e72c56d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,3 @@ -[options] -package_dir = - =src -setup_requires = - setuptools - setuptools-scm>=6.0 - [options.package_data] _pytest = py.typed pytest = py.typed From c76ea72331f6c45e248b92be8233188ecd2347b7 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 15:33:27 +0100 Subject: [PATCH 05/21] [pyproject.toml] Moving 'package_data' (py.typed) from setup.cfg --- pyproject.toml | 4 ++++ setup.cfg | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 38a9471e0..427de749a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,10 @@ requires = [ ] build-backend = "setuptools.build_meta" +[tool.setuptools.package-data] +"_pytest" = ["py.typed"] +"pytest" = ["py.typed"] + [tool.setuptools_scm] write_to = "src/_pytest/_version.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3e72c56d7..000000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[options.package_data] -_pytest = py.typed -pytest = py.typed From 835e8032f4b856c9e6d606dc909bde45281bdfb7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:29:38 +0000 Subject: [PATCH 06/21] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.15 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.15...v0.2.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 032fe8c4d..b5f68ecfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.15" + rev: "v0.2.0" hooks: - id: ruff args: ["--fix"] From 757778f5f611a06ae5a8ac48c5c950cb1f8fceca Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 5 Feb 2024 20:20:31 +0100 Subject: [PATCH 07/21] [pyproject-fmt] Add pre-commit hook and autofix existing --- .pre-commit-config.yaml | 6 + pyproject.toml | 280 ++++++++++++++++++++-------------------- 2 files changed, 147 insertions(+), 139 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c1ebb3c2..22a9ec95f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,6 +42,12 @@ repos: # for mypy running on python>=3.11 since exceptiongroup is only a dependency # on <3.11 - exceptiongroup>=1.0.0rc8 +- repo: https://github.com/tox-dev/pyproject-fmt + rev: "1.7.0" + hooks: + - id: pyproject-fmt + # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version + additional_dependencies: ["tox>=4.9"] - repo: local hooks: - id: rst diff --git a/pyproject.toml b/pyproject.toml index 427de749a..98fa51c44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,12 @@ [project] name = "pytest" -dynamic = ["version"] description = "pytest: simple powerful testing with Python" +readme = "README.rst" +keywords = [ + "test", + "unittest", +] +license = {text = "MIT"} authors = [ {name = "Holger Krekel"}, {name = "Bruno Oliveira"}, @@ -11,18 +16,15 @@ authors = [ {name = "Florian Bruhin"}, {name = "Others (See AUTHORS)"}, ] -readme = "README.rst" -license = {text = "MIT"} -keywords = ["test", "unittest"] +requires-python = ">=3.8" classifiers = [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", - "Operating System :: Unix", "Operating System :: POSIX", - "Programming Language :: Python :: 3", + "Operating System :: Unix", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -33,21 +35,21 @@ classifiers = [ "Topic :: Software Development :: Testing", "Topic :: Utilities", ] - +dynamic = [ + "version", +] dependencies = [ - "colorama;sys_platform=='win32'", - "exceptiongroup>=1.0.0rc8;python_version<'3.11'", + 'colorama; sys_platform == "win32"', + 'exceptiongroup>=1.0.0rc8; python_version < "3.11"', "iniconfig", "packaging", - "pluggy>=1.4.0,<2.0", - "tomli>=1.0.0;python_version<'3.11'", + "pluggy<2.0,>=1.4", + 'tomli>=1; python_version < "3.11"', ] -requires-python = ">=3.8" - [project.optional-dependencies] testing = [ "argcomplete", - "attrs>=19.2.0", + "attrs>=19.2", "hypothesis>=3.56", "mock", "pygments>=2.7.2", @@ -55,24 +57,22 @@ testing = [ "setuptools", "xmlschema", ] - +[project.urls] +Changelog = "https://docs.pytest.org/en/stable/changelog.html" +Homepage = "https://docs.pytest.org/en/latest/" +Source = "https://github.com/pytest-dev/pytest" +Tracker = "https://github.com/pytest-dev/pytest/issues" +Twitter = "https://twitter.com/pytestdotorg" [project.scripts] "py.test" = "pytest:console_main" pytest = "pytest:console_main" -[project.urls] -Homepage = "https://docs.pytest.org/en/latest/" -Changelog = "https://docs.pytest.org/en/stable/changelog.html" -Twitter = "https://twitter.com/pytestdotorg" -Source = "https://github.com/pytest-dev/pytest" -Tracker = "https://github.com/pytest-dev/pytest/issues" - [build-system] -requires = [ - "setuptools>=45.0", - "setuptools-scm[toml]>=6.2.3", -] build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=45", + "setuptools-scm[toml]>=6.2.3", +] [tool.setuptools.package-data] "_pytest" = ["py.typed"] @@ -81,122 +81,9 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] write_to = "src/_pytest/_version.py" -[tool.pytest.ini_options] -minversion = "2.0" -addopts = "-rfEX -p pytester --strict-markers" -python_files = ["test_*.py", "*_test.py", "testing/python/*.py"] -python_classes = ["Test", "Acceptance"] -python_functions = ["test"] -# NOTE: "doc" is not included here, but gets tested explicitly via "doctesting". -testpaths = ["testing"] -norecursedirs = [ - "testing/example_scripts", - ".*", - "build", - "dist", -] -xfail_strict = true -filterwarnings = [ - "error", - "default:Using or importing the ABCs:DeprecationWarning:unittest2.*", - # produced by older pyparsing<=2.2.0. - "default:Using or importing the ABCs:DeprecationWarning:pyparsing.*", - "default:the imp module is deprecated in favour of importlib:DeprecationWarning:nose.*", - # distutils is deprecated in 3.10, scheduled for removal in 3.12 - "ignore:The distutils package is deprecated:DeprecationWarning", - # produced by pytest-xdist - "ignore:.*type argument to addoption.*:DeprecationWarning", - # produced on execnet (pytest-xdist) - "ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning", - # pytest's own futurewarnings - "ignore::pytest.PytestExperimentalApiWarning", - # Do not cause SyntaxError for invalid escape sequences in py37. - # Those are caught/handled by pyupgrade, and not easy to filter with the - # module being the filename (with .py removed). - "default:invalid escape sequence:DeprecationWarning", - # ignore not yet fixed warnings for hook markers - "default:.*not marked using pytest.hook.*", - "ignore:.*not marked using pytest.hook.*::xdist.*", - # ignore use of unregistered marks, because we use many to test the implementation - "ignore::_pytest.warning_types.PytestUnknownMarkWarning", - # https://github.com/benjaminp/six/issues/341 - "ignore:_SixMetaPathImporter\\.exec_module\\(\\) not found; falling back to load_module\\(\\):ImportWarning", - # https://github.com/benjaminp/six/pull/352 - "ignore:_SixMetaPathImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning", - # https://github.com/pypa/setuptools/pull/2517 - "ignore:VendorImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning", - # https://github.com/pytest-dev/execnet/pull/127 - "ignore:isSet\\(\\) is deprecated, use is_set\\(\\) instead:DeprecationWarning", -] -pytester_example_dir = "testing/example_scripts" -markers = [ - # dummy markers for testing - "foo", - "bar", - "baz", - # conftest.py reorders tests moving slow ones to the end of the list - "slow", - # experimental mark for all tests using pexpect - "uses_pexpect", -] - - -[tool.towncrier] -package = "pytest" -package_dir = "src" -filename = "doc/en/changelog.rst" -directory = "changelog/" -title_format = "pytest {version} ({project_date})" -template = "changelog/_template.rst" - - [[tool.towncrier.type]] - directory = "breaking" - name = "Breaking Changes" - showcontent = true - - [[tool.towncrier.type]] - directory = "deprecation" - name = "Deprecations" - showcontent = true - - [[tool.towncrier.type]] - directory = "feature" - name = "Features" - showcontent = true - - [[tool.towncrier.type]] - directory = "improvement" - name = "Improvements" - showcontent = true - - [[tool.towncrier.type]] - directory = "bugfix" - name = "Bug Fixes" - showcontent = true - - [[tool.towncrier.type]] - directory = "vendor" - name = "Vendored Libraries" - showcontent = true - - [[tool.towncrier.type]] - directory = "doc" - name = "Improved Documentation" - showcontent = true - - [[tool.towncrier.type]] - directory = "trivial" - name = "Trivial/Internal Changes" - showcontent = true - [tool.black] target-version = ['py38'] -# check-wheel-contents is executed by the build-and-inspect-python-package action. -[tool.check-wheel-contents] -# W009: Wheel contains multiple toplevel library entries -ignore = "W009" - [tool.ruff] src = ["src"] line-length = 88 @@ -266,6 +153,121 @@ lines-after-imports = 2 "src/_pytest/_version.py" = ["I001"] "testing/python/approx.py" = ["B015"] +[tool.check-wheel-contents] +# check-wheel-contents is executed by the build-and-inspect-python-package action. +# W009: Wheel contains multiple toplevel library entries +ignore = "W009" + +[tool.pyproject-fmt] +indent = 4 + +[tool.pytest.ini_options] +minversion = "2.0" +addopts = "-rfEX -p pytester --strict-markers" +python_files = ["test_*.py", "*_test.py", "testing/python/*.py"] +python_classes = ["Test", "Acceptance"] +python_functions = ["test"] +# NOTE: "doc" is not included here, but gets tested explicitly via "doctesting". +testpaths = ["testing"] +norecursedirs = [ + "testing/example_scripts", + ".*", + "build", + "dist", +] +xfail_strict = true +filterwarnings = [ + "error", + "default:Using or importing the ABCs:DeprecationWarning:unittest2.*", + # produced by older pyparsing<=2.2.0. + "default:Using or importing the ABCs:DeprecationWarning:pyparsing.*", + "default:the imp module is deprecated in favour of importlib:DeprecationWarning:nose.*", + # distutils is deprecated in 3.10, scheduled for removal in 3.12 + "ignore:The distutils package is deprecated:DeprecationWarning", + # produced by pytest-xdist + "ignore:.*type argument to addoption.*:DeprecationWarning", + # produced on execnet (pytest-xdist) + "ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning", + # pytest's own futurewarnings + "ignore::pytest.PytestExperimentalApiWarning", + # Do not cause SyntaxError for invalid escape sequences in py37. + # Those are caught/handled by pyupgrade, and not easy to filter with the + # module being the filename (with .py removed). + "default:invalid escape sequence:DeprecationWarning", + # ignore not yet fixed warnings for hook markers + "default:.*not marked using pytest.hook.*", + "ignore:.*not marked using pytest.hook.*::xdist.*", + # ignore use of unregistered marks, because we use many to test the implementation + "ignore::_pytest.warning_types.PytestUnknownMarkWarning", + # https://github.com/benjaminp/six/issues/341 + "ignore:_SixMetaPathImporter\\.exec_module\\(\\) not found; falling back to load_module\\(\\):ImportWarning", + # https://github.com/benjaminp/six/pull/352 + "ignore:_SixMetaPathImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning", + # https://github.com/pypa/setuptools/pull/2517 + "ignore:VendorImporter\\.find_spec\\(\\) not found; falling back to find_module\\(\\):ImportWarning", + # https://github.com/pytest-dev/execnet/pull/127 + "ignore:isSet\\(\\) is deprecated, use is_set\\(\\) instead:DeprecationWarning", +] +pytester_example_dir = "testing/example_scripts" +markers = [ + # dummy markers for testing + "foo", + "bar", + "baz", + # conftest.py reorders tests moving slow ones to the end of the list + "slow", + # experimental mark for all tests using pexpect + "uses_pexpect", +] + +[tool.towncrier] +package = "pytest" +package_dir = "src" +filename = "doc/en/changelog.rst" +directory = "changelog/" +title_format = "pytest {version} ({project_date})" +template = "changelog/_template.rst" + + [[tool.towncrier.type]] + directory = "breaking" + name = "Breaking Changes" + showcontent = true + + [[tool.towncrier.type]] + directory = "deprecation" + name = "Deprecations" + showcontent = true + + [[tool.towncrier.type]] + directory = "feature" + name = "Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "improvement" + name = "Improvements" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "vendor" + name = "Vendored Libraries" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Improved Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "trivial" + name = "Trivial/Internal Changes" + showcontent = true + [tool.mypy] mypy_path = ["src"] check_untyped_defs = true From d1095426c163c8a005d0c1c81612c4cedfe698b5 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 6 Feb 2024 14:38:52 +0100 Subject: [PATCH 08/21] Update setuptools version to the one that support pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 98fa51c44..efbb9b6c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ pytest = "pytest:console_main" [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools>=45", + "setuptools>=61", "setuptools-scm[toml]>=6.2.3", ] From 6e5008f19f3c8fffa1ea2b980d4214d9c338b481 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 6 Feb 2024 23:40:13 +0200 Subject: [PATCH 09/21] doctest: don't open code the module import Currently, `DoctestModule` does `import_path` on its own. This changes it to use `importtestmodule` as `Module` does. The behavioral changes are: - Much better error messages on import errors. - Handles a few more error cases (see `importtestmodule`). This technically expands the cover of `--doctest-ignore-import-errors` but I think it makes sense. - Considers `pytest_plugins` in the module. - Populates `self.obj` as properly (without double-imports) as is expected from a `PyCollector`. This is also needed for the next commit. --- src/_pytest/doctest.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py index fdf84d300..e0fb7c161 100644 --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -40,7 +40,6 @@ from _pytest.nodes import Item from _pytest.outcomes import OutcomeException from _pytest.outcomes import skip from _pytest.pathlib import fnmatch_ex -from _pytest.pathlib import import_path from _pytest.python import Module from _pytest.python_api import approx from _pytest.warning_types import PytestWarning @@ -107,7 +106,7 @@ def pytest_addoption(parser: Parser) -> None: "--doctest-ignore-import-errors", action="store_true", default=False, - help="Ignore doctest ImportErrors", + help="Ignore doctest collection errors", dest="doctest_ignore_import_errors", ) group.addoption( @@ -561,12 +560,8 @@ class DoctestModule(Module): pass try: - module = import_path( - self.path, - root=self.config.rootpath, - mode=self.config.getoption("importmode"), - ) - except ImportError: + module = self.obj + except Collector.CollectError: if self.config.getvalue("doctest_ignore_import_errors"): skip("unable to import module %r" % self.path) else: From 4c894f20a1df9229b871191972b48cac3d8a41d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:37:56 -0300 Subject: [PATCH 10/21] build(deps): Bump django in /testing/plugins_integration (#11946) Bumps [django](https://github.com/django/django) from 5.0 to 5.0.2. - [Commits](https://github.com/django/django/compare/5.0...5.0.2) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- testing/plugins_integration/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/plugins_integration/requirements.txt b/testing/plugins_integration/requirements.txt index 9bb885560..d7b066251 100644 --- a/testing/plugins_integration/requirements.txt +++ b/testing/plugins_integration/requirements.txt @@ -1,5 +1,5 @@ anyio[curio,trio]==4.2.0 -django==5.0 +django==5.0.2 pytest-asyncio==0.23.3 # Temporarily not installed until pytest-bdd is fixed: # https://github.com/pytest-dev/pytest/pull/11785 From 9cd14b4ffb1d96342a2e9d1f5cb92eab53bb5079 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 6 Feb 2024 23:09:00 +0200 Subject: [PATCH 11/21] doctest: fix autouse fixtures possibly not getting picked up Fix #11929. Figured out what's going on. We have the following collection tree: ``` ``` And the `test_main.py` contains an autouse fixture (`fake_game_ui`) that `doctest_main` needs in order to run properly. The fixture doesn't run! It doesn't run because nothing collects the fixtures from (calls `parsefactories()` on) the `test_main.py` `DoctestModule`. How come it only started happening with commit ab63ebb3dc07b89670b96ae97044f48406c44fa0? Turns out it mostly only worked accidentally. Each `DoctestModule` is also collected as a normal `Module`, with the `Module` collected after the `DoctestModule`. For example, if we add a non-doctest test to `test_main.py`, the collection tree looks like this: ``` ``` Now, `Module` *does* collect fixtures. When autouse fixtures are collected, they are added to the `_nodeid_autousenames` dict. Before ab63ebb3dc07b89670b96ae97044f48406c44fa0, `DoctestItem` consults `_nodeid_autousenames` at *setup* time. At this point, the `Module` has collected and so it ended up picking the autouse fixture (this relies on another "accident", that the `DoctestModule` and `Module` have the same node ID). After ab63ebb3dc07b89670b96ae97044f48406c44fa0, `DoctestItem` consults `_nodeid_autousenames` at *collection* time (= when it's created). At this point, the `Module` hasn't collected yet, so the autouse fixture is not picked out. The fix is simple -- have `DoctestModule.collect()` call `parsefactories`. From some testing I've done it shouldn't have negative consequences (I hope). --- changelog/11929.bugfix.rst | 1 + src/_pytest/doctest.py | 4 ++++ testing/test_doctest.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 changelog/11929.bugfix.rst diff --git a/changelog/11929.bugfix.rst b/changelog/11929.bugfix.rst new file mode 100644 index 000000000..8ab50e6f4 --- /dev/null +++ b/changelog/11929.bugfix.rst @@ -0,0 +1 @@ +Fix a regression in pytest 8.0.0 whereby autouse fixtures defined in a module get ignored by the doctests in the module. diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py index e0fb7c161..8fe992b6a 100644 --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -567,6 +567,10 @@ class DoctestModule(Module): else: raise + # While doctests currently don't support fixtures directly, we still + # need to pick up autouse fixtures. + self.session._fixturemanager.parsefactories(self) + # Uses internal doctest module parsing mechanism. finder = MockAwareDocTestFinder() optionflags = get_optionflags(self.config) diff --git a/testing/test_doctest.py b/testing/test_doctest.py index 372528490..c91ec31cd 100644 --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -1376,6 +1376,38 @@ class TestDoctestAutoUseFixtures: str(result.stdout.no_fnmatch_line("*FAILURES*")) result.stdout.fnmatch_lines(["*=== 1 passed in *"]) + @pytest.mark.parametrize("scope", [*SCOPES, "package"]) + def test_auto_use_defined_in_same_module( + self, pytester: Pytester, scope: str + ) -> None: + """Autouse fixtures defined in the same module as the doctest get picked + up properly. + + Regression test for #11929. + """ + pytester.makepyfile( + f""" + import pytest + + AUTO = "the fixture did not run" + + @pytest.fixture(autouse=True, scope="{scope}") + def auto(request): + global AUTO + AUTO = "the fixture ran" + + def my_doctest(): + '''My doctest. + + >>> my_doctest() + 'the fixture ran' + ''' + return AUTO + """ + ) + result = pytester.runpytest("--doctest-modules") + result.assert_outcomes(passed=1) + class TestDoctestNamespaceFixture: SCOPES = ["module", "session", "class", "function"] From 42785cca442cb747aaec707626076ab23c23b4a1 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 7 Feb 2024 22:13:23 +0200 Subject: [PATCH 12/21] Revert "testing: temporarily disable test due to hypothesis issue (#11836)" This reverts commit 5cd0535395541d8940035418b368331318002199. --- testing/python/metafunc.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index e132725e1..ed22c2b5a 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -14,6 +14,9 @@ from typing import Sequence from typing import Tuple from typing import Union +import hypothesis +from hypothesis import strategies + from _pytest import fixtures from _pytest import python from _pytest.compat import getfuncargnames @@ -26,10 +29,6 @@ from _pytest.scope import Scope import pytest -# import hypothesis -# from hypothesis import strategies - - class TestMetafunc: def Metafunc(self, func, config=None) -> python.Metafunc: # The unit tests of this class check if things work correctly @@ -294,15 +293,14 @@ class TestMetafunc: assert metafunc._calls[2].id == "x1-a" assert metafunc._calls[3].id == "x1-b" - # TODO: Uncomment - https://github.com/HypothesisWorks/hypothesis/pull/3849 - # @hypothesis.given(strategies.text() | strategies.binary()) - # @hypothesis.settings( - # deadline=400.0 - # ) # very close to std deadline and CI boxes are not reliable in CPU power - # def test_idval_hypothesis(self, value) -> None: - # escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6) - # assert isinstance(escaped, str) - # escaped.encode("ascii") + @hypothesis.given(strategies.text() | strategies.binary()) + @hypothesis.settings( + deadline=400.0 + ) # very close to std deadline and CI boxes are not reliable in CPU power + def test_idval_hypothesis(self, value) -> None: + escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6) + assert isinstance(escaped, str) + escaped.encode("ascii") def test_unicode_idval(self) -> None: """Test that Unicode strings outside the ASCII character set get From 9454fc38d3636b79ee657d6cacf7477eb8acee52 Mon Sep 17 00:00:00 2001 From: whysage <67018871+whysage@users.noreply.github.com> Date: Thu, 8 Feb 2024 02:47:56 +0200 Subject: [PATCH 13/21] closes: 10865 Fix muted exception (#11804) * feat: 10865 * feat: 10865 refactor code and tests * feat: 10865 add test skip for pypy * feat: 10865 add test with valid warning * feat: 10865 fix v2 for codecov * feat: 10865 fix conflict --- AUTHORS | 1 + changelog/10865.improvement.rst | 2 ++ src/_pytest/recwarn.py | 11 +++++++++++ testing/test_recwarn.py | 27 +++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 changelog/10865.improvement.rst diff --git a/AUTHORS b/AUTHORS index 879097622..25159b8b0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -416,6 +416,7 @@ Vivaan Verma Vlad Dragos Vlad Radziuk Vladyslav Rachek +Volodymyr Kochetkov Volodymyr Piskun Wei Lin Wil Cooley diff --git a/changelog/10865.improvement.rst b/changelog/10865.improvement.rst new file mode 100644 index 000000000..2c2856dfe --- /dev/null +++ b/changelog/10865.improvement.rst @@ -0,0 +1,2 @@ +:func:`pytest.warns` now validates that warning object's ``message`` is of type `str` -- currently in Python it is possible to pass other types than `str` when creating `Warning` instances, however this causes an exception when :func:`warnings.filterwarnings` is used to filter those warnings. See `CPython #103577 `__ for a discussion. +While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing. diff --git a/src/_pytest/recwarn.py b/src/_pytest/recwarn.py index aa58d43b4..62df274bd 100644 --- a/src/_pytest/recwarn.py +++ b/src/_pytest/recwarn.py @@ -329,3 +329,14 @@ class WarningsChecker(WarningsRecorder): module=w.__module__, source=w.source, ) + # Check warnings has valid argument type (#10865). + wrn: warnings.WarningMessage + for wrn in self: + self._validate_message(wrn) + + @staticmethod + def _validate_message(wrn: Any) -> None: + if not isinstance(msg := wrn.message.args[0], str): + raise TypeError( + f"Warning message must be str, got {msg!r} (type {type(msg).__name__})" + ) diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py index 5045c781e..e269bd7dd 100644 --- a/testing/test_recwarn.py +++ b/testing/test_recwarn.py @@ -1,4 +1,5 @@ # mypy: allow-untyped-defs +import sys from typing import List from typing import Optional from typing import Type @@ -477,3 +478,29 @@ class TestWarns: with pytest.raises(ValueError, match="some exception"): warnings.warn("some warning", category=FutureWarning) raise ValueError("some exception") + + +def test_raise_type_error_on_non_string_warning() -> None: + """Check pytest.warns validates warning messages are strings (#10865).""" + with pytest.raises(TypeError, match="Warning message must be str"): + with pytest.warns(UserWarning): + warnings.warn(1) # type: ignore + + +def test_no_raise_type_error_on_string_warning() -> None: + """Check pytest.warns validates warning messages are strings (#10865).""" + with pytest.warns(UserWarning): + warnings.warn("Warning") + + +@pytest.mark.skipif( + hasattr(sys, "pypy_version_info"), + reason="Not for pypy", +) +def test_raise_type_error_on_non_string_warning_cpython() -> None: + # Check that we get the same behavior with the stdlib, at least if filtering + # (see https://github.com/python/cpython/issues/103577 for details) + with pytest.raises(TypeError): + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", "test") + warnings.warn(1) # type: ignore From d02618d173cc0229eb85befd3efbf6132135304a Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 9 Feb 2024 10:48:05 +0200 Subject: [PATCH 14/21] Fix ruff deprecation warning warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`: - 'ignore' -> 'lint.ignore' - 'select' -> 'lint.select' --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index efbb9b6c2..cf3265efe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,6 +87,11 @@ target-version = ['py38'] [tool.ruff] src = ["src"] line-length = 88 + +[tool.ruff.format] +docstring-code-format = true + +[tool.ruff.lint] select = [ "B", # bugbear "D", # pydocstyle @@ -130,9 +135,6 @@ ignore = [ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` ] -[tool.ruff.format] -docstring-code-format = true - [tool.ruff.lint.pycodestyle] # In order to be able to format for 88 char in ruff format max-line-length = 120 From d1ee6d154f0eef2c753ed6a123eec583d02ae00b Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 9 Feb 2024 11:08:33 +0200 Subject: [PATCH 15/21] Enable flake8-pie --- pyproject.toml | 1 + src/_pytest/_py/path.py | 2 +- testing/test_assertion.py | 2 +- testing/test_config.py | 6 ++---- testing/test_skipping.py | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cf3265efe..e17694723 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,7 @@ select = [ "UP", # pyupgrade "RUF", # ruff "W", # pycodestyle + "PIE", # flake8-pie ] ignore = [ # bugbear ignore diff --git a/src/_pytest/_py/path.py b/src/_pytest/_py/path.py index 554cb4a67..7701561d9 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -452,7 +452,7 @@ class LocalPath: def ensure_dir(self, *args): """Ensure the path joined with args is a directory.""" - return self.ensure(*args, **{"dir": True}) + return self.ensure(*args, dir=True) def bestrelpath(self, dest): """Return a string which is a relative path from self diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 2d92128fb..ef4e36644 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -601,7 +601,7 @@ class TestAssert_reprcompare: def test_list_dont_wrap_strings(self) -> None: long_a = "a" * 10 - l1 = ["a"] + [long_a for _ in range(0, 7)] + l1 = ["a"] + [long_a for _ in range(7)] l2 = ["should not get wrapped"] diff = callequal(l1, l2, verbose=True) assert diff == [ diff --git a/testing/test_config.py b/testing/test_config.py index f2651dbeb..ead693cf4 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1231,8 +1231,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None: import myplugin assert myplugin.terminal_plugin == [False, True] """, - **{ - "myplugin": """ + myplugin=""" terminal_plugin = [] def pytest_configure(config): @@ -1241,8 +1240,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None: def pytest_sessionstart(session): config = session.config terminal_plugin.append(bool(config.pluginmanager.get_plugin("terminalreporter"))) - """ - }, + """, ) pytester.syspathinsert() result = pytester.runpytest("-p", "myplugin", str(p1)) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index 4391c0642..3f1c83f5b 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -74,7 +74,7 @@ class TestEvaluation: """@pytest.mark.skipif("not hasattr(os, 'murks')")""", """@pytest.mark.skipif(condition="hasattr(os, 'murks')")""", ] - for i in range(0, 2): + for i in range(2): item = pytester.getitem( f""" import pytest From a182e10b06e0efd91d78f33db5c7424a2afef258 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 9 Feb 2024 11:14:36 +0200 Subject: [PATCH 16/21] Enable lint PGH004 - Use specific rule codes when using noqa --- bench/bench.py | 2 +- doc/en/example/assertion/failure_demo.py | 4 ++-- pyproject.toml | 1 + src/_pytest/assertion/rewrite.py | 2 +- testing/python/fixtures.py | 2 +- testing/test_assertrewrite.py | 2 +- testing/test_collection.py | 2 +- testing/test_warnings.py | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bench/bench.py b/bench/bench.py index 91e380a80..437d3259d 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -5,7 +5,7 @@ if __name__ == "__main__": import cProfile import pstats - import pytest # NOQA + import pytest # noqa: F401 script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"] cProfile.run("pytest.cmdline.main(%r)" % script, "prof") diff --git a/doc/en/example/assertion/failure_demo.py b/doc/en/example/assertion/failure_demo.py index abb9bce50..f7a9c2794 100644 --- a/doc/en/example/assertion/failure_demo.py +++ b/doc/en/example/assertion/failure_demo.py @@ -172,7 +172,7 @@ class TestRaises: raise ValueError("demo error") def test_tupleerror(self): - a, b = [1] # NOQA + a, b = [1] # noqa: F841 def test_reinterpret_fails_with_print_for_the_fun_of_it(self): items = [1, 2, 3] @@ -180,7 +180,7 @@ class TestRaises: a, b = items.pop() def test_some_error(self): - if namenotexi: # NOQA + if namenotexi: # noqa: F821 pass def func1(self): diff --git a/pyproject.toml b/pyproject.toml index e17694723..0a83df1bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,7 @@ select = [ "RUF", # ruff "W", # pycodestyle "PIE", # flake8-pie + "PGH004", # pygrep-hooks - Use specific rule codes when using noqa ] ignore = [ # bugbear ignore diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 9f3b65e8f..ddae34c73 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -1006,7 +1006,7 @@ class AssertionRewriter(ast.NodeVisitor): if i: fail_inner: List[ast.stmt] = [] # cond is set in a prior loop iteration below - self.expl_stmts.append(ast.If(cond, fail_inner, [])) # noqa + self.expl_stmts.append(ast.If(cond, fail_inner, [])) # noqa: F821 self.expl_stmts = fail_inner # Check if the left operand is a ast.NamedExpr and the value has already been visited if ( diff --git a/testing/python/fixtures.py b/testing/python/fixtures.py index d0e8723cb..35ed2efc5 100644 --- a/testing/python/fixtures.py +++ b/testing/python/fixtures.py @@ -712,7 +712,7 @@ class TestRequestBasic: ) def test_request_garbage(self, pytester: Pytester) -> None: try: - import xdist # noqa + import xdist # noqa: F401 except ImportError: pass else: diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 6e1a9d54e..b045b601e 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -200,7 +200,7 @@ class TestAssertionRewrite: assert getmsg(f2) == "assert False" def f3() -> None: - assert a_global # type: ignore[name-defined] # noqa + assert a_global # type: ignore[name-defined] # noqa: F821 assert getmsg(f3, {"a_global": False}) == "assert False" diff --git a/testing/test_collection.py b/testing/test_collection.py index 8e41e0fae..45a1ca9ae 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -535,7 +535,7 @@ class TestSession: newid = item.nodeid assert newid == id pprint.pprint(hookrec.calls) - topdir = pytester.path # noqa + topdir = pytester.path # noqa: F841 hookrec.assert_contains( [ ("pytest_collectstart", "collector.path == topdir"), diff --git a/testing/test_warnings.py b/testing/test_warnings.py index 5b2f27139..3ef0cd3b5 100644 --- a/testing/test_warnings.py +++ b/testing/test_warnings.py @@ -794,7 +794,7 @@ def test_resource_warning(pytester: Pytester, monkeypatch: pytest.MonkeyPatch) - # available, using `importorskip("tracemalloc")` for example, # because we want to ensure the same code path does not break in those platforms. try: - import tracemalloc # noqa + import tracemalloc # noqa: F401 has_tracemalloc = True except ImportError: From 7690a0ddf15785f0af0e9a4cf8524379c53cd061 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 9 Feb 2024 14:59:04 +0100 Subject: [PATCH 17/21] Improve error message when using @pytest.fixture twice (#11670) * Improve error message when using @pytest.fixture twice While obvious in hindsight, this error message confused me. I thought my fixture function was used in a test function twice, since the wording is ambiguous. Also, the error does not tell me *which* function is the culprit. Finally, this adds a test, which wasn't done in cfd16d0dac1c935952b892bfbc225978c9b25de3 where this was originally implemented. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/_pytest/fixtures.py | 2 +- testing/python/fixtures.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index b0bbc0e04..67eb05425 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -1188,7 +1188,7 @@ class FixtureFunctionMarker: if getattr(function, "_pytestfixturefunction", False): raise ValueError( - "fixture is being applied more than once to the same function" + f"@pytest.fixture is being applied more than once to the same function {function.__name__!r}" ) if hasattr(function, "pytestmark"): diff --git a/testing/python/fixtures.py b/testing/python/fixtures.py index 35ed2efc5..0fb5aa450 100644 --- a/testing/python/fixtures.py +++ b/testing/python/fixtures.py @@ -4353,6 +4353,27 @@ def test_call_fixture_function_error(): assert fix() == 1 +def test_fixture_double_decorator(pytester: Pytester) -> None: + """Check if an error is raised when using @pytest.fixture twice.""" + pytester.makepyfile( + """ + import pytest + + @pytest.fixture + @pytest.fixture + def fixt(): + pass + """ + ) + result = pytester.runpytest() + result.assert_outcomes(errors=1) + result.stdout.fnmatch_lines( + [ + "E * ValueError: @pytest.fixture is being applied more than once to the same function 'fixt'" + ] + ) + + def test_fixture_param_shadowing(pytester: Pytester) -> None: """Parametrized arguments would be shadowed if a fixture with the same name also exists (#5036)""" pytester.makepyfile( From 1180348303599f835d37b2028288ce81b90b85c5 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 10 Feb 2024 15:46:45 +0100 Subject: [PATCH 18/21] [ruff] Add 'consider-using-in' from pylint See https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/consider-using-in.html An automated fix from ruff is available (but it's unsafe for now). --- pyproject.toml | 1 + src/_pytest/compat.py | 2 +- src/_pytest/junitxml.py | 2 +- src/_pytest/python.py | 2 +- src/_pytest/terminal.py | 2 +- testing/test_assertrewrite.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0a83df1bb..56b32b210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,7 @@ select = [ "W", # pycodestyle "PIE", # flake8-pie "PGH004", # pygrep-hooks - Use specific rule codes when using noqa + "PLR1714", # Consider merging multiple comparisons ] ignore = [ # bugbear ignore diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index 400b38642..077fa65da 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -289,7 +289,7 @@ def get_user_id() -> int | None: # mypy follows the version and platform checking expectation of PEP 484: # https://mypy.readthedocs.io/en/stable/common_issues.html?highlight=platform#python-version-and-system-platform-checks # Containment checks are too complex for mypy v1.5.0 and cause failure. - if sys.platform == "win32" or sys.platform == "emscripten": + if sys.platform in {"win32", "emscripten"}: # win32 does not have a getuid() function. # Emscripten has a return 0 stub. return None diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index 51becf97b..4ca356f31 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -624,7 +624,7 @@ class LogXML: def update_testcase_duration(self, report: TestReport) -> None: """Accumulate total duration for nodeid from given report and update the Junit.testcase with the new total if already created.""" - if self.report_duration == "total" or report.when == self.report_duration: + if self.report_duration in {"total", report.when}: reporter = self.node_reporter(report) reporter.duration += getattr(report, "duration", 0.0) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 10ca00890..cf3415d98 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1787,7 +1787,7 @@ class Function(PyobjMixin, nodes.Item): ntraceback = Traceback( ( entry - if i == 0 or i == len(ntraceback) - 1 + if i in {0, len(ntraceback) - 1} else entry.with_repr_style("short") ) for i, entry in enumerate(ntraceback) diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index 62dafe703..8909d95ef 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -381,7 +381,7 @@ class TerminalReporter: if self.config.getoption("setupshow", False): return False cfg: str = self.config.getini("console_output_style") - if cfg == "progress" or cfg == "progress-even-when-capture-no": + if cfg in {"progress", "progress-even-when-capture-no"}: return "progress" elif cfg == "count": return "count" diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index b045b601e..e676d562c 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -429,7 +429,7 @@ class TestAssertionRewrite: def f2() -> None: x = 1 - assert x == 1 or x == 2 + assert x == 1 or x == 2 # noqa: PLR1714 getmsg(f2, must_pass=True) From b922270ce7e6a7c0bd521f1eab3ea82b6041537d Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 10 Feb 2024 15:51:33 +0100 Subject: [PATCH 19/21] [performance] Micro-optimization in '_traceback_filter' Should be around 40% faster according to this simplified small benchmark: python -m timeit "a=[0, 1, 2, 3, 4];b=list((e if i in {0, len(a) -1} else str(e)) for i, e in enumerate(a))" 200000 loops, best of 5: 1.12 usec per loop python -m timeit "a=[0, 1, 2, 3, 4];b=list((a[0], *(str(e) for e in a[1:-1]), a[-1]))" 500000 loops, best of 5: 651 nsec per loop python -m timeit "a=[0, 1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16];b=list((e if i in {0, len(a) -1} else str(e)) for i, e in enumerate(a))" 100000 loops, best of 5: 3.31 usec per loop python -m timeit "a=[0, 1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16];b=list((a[0], *(str(e) for e in a[1:-1]), a[-1]))" 200000 loops, best of 5: 1.72 usec per loop --- src/_pytest/python.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index cf3415d98..91c48540d 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1786,11 +1786,10 @@ class Function(PyobjMixin, nodes.Item): if len(ntraceback) > 2: ntraceback = Traceback( ( - entry - if i in {0, len(ntraceback) - 1} - else entry.with_repr_style("short") + ntraceback[0], + *(t.with_repr_style("short") for t in ntraceback[1:-1]), + ntraceback[-1], ) - for i, entry in enumerate(ntraceback) ) return ntraceback From 7da04c963f7e134c86461b252828ebb7594151a5 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 10 Feb 2024 23:41:33 +0100 Subject: [PATCH 20/21] [ruff] Add unwanted pylint message to the ignore list --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 56b32b210..72988e233 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,8 @@ select = [ "W", # pycodestyle "PIE", # flake8-pie "PGH004", # pygrep-hooks - Use specific rule codes when using noqa + "PLE", # pylint error + "PLW", # pylint warning "PLR1714", # Consider merging multiple comparisons ] ignore = [ @@ -136,6 +138,11 @@ ignore = [ "D415", # First line should end with a period, question mark, or exclamation point # ruff ignore "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` + # pylint ignore + "PLW0603", # Using the global statement + "PLW0120", # remove the else and dedent its contents + "PLW2901", # for loop variable overwritten by assignment target + "PLR5501", # Use `elif` instead of `else` then `if` ] [tool.ruff.lint.pycodestyle] From 23dfb52974af5d006a2dea3de5b9b6035cba6a65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:50:24 -0300 Subject: [PATCH 21/21] [automated] Update plugin list (#11964) Co-authored-by: pytest bot --- doc/en/reference/plugin_list.rst | 158 +++++++++++++++---------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 9ada47c7a..ce1e4f6bd 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -67,7 +67,7 @@ This list contains 1367 plugins. :pypi:`pytest-allure-intersection` Oct 27, 2022 N/A pytest (<5) :pypi:`pytest-allure-spec-coverage` The pytest plugin aimed to display test coverage of the specs(requirements) in Allure Oct 26, 2021 N/A pytest :pypi:`pytest-alphamoon` Static code checks used at Alphamoon Dec 30, 2021 5 - Production/Stable pytest (>=3.5.0) - :pypi:`pytest-analyzer` this plugin allows to analyze tests in pytest project, collect test metadata and sync it with testomat.io TCM system Dec 06, 2023 N/A pytest >=7.3.1 + :pypi:`pytest-analyzer` this plugin allows to analyze tests in pytest project, collect test metadata and sync it with testomat.io TCM system Feb 06, 2024 N/A pytest >=7.3.1 :pypi:`pytest-android` This fixture provides a configured "driver" for Android Automated Testing, using uiautomator2. Feb 21, 2019 3 - Alpha pytest :pypi:`pytest-anki` A pytest plugin for testing Anki add-ons Jul 31, 2022 4 - Beta pytest (>=3.5.0) :pypi:`pytest-annotate` pytest-annotate: Generate PyAnnotate annotations from your pytest tests. Jun 07, 2022 3 - Alpha pytest (<8.0.0,>=3.2.0) @@ -86,7 +86,7 @@ This list contains 1367 plugins. :pypi:`pytest-appengine` AppEngine integration that works well with pytest-django Feb 27, 2017 N/A N/A :pypi:`pytest-appium` Pytest plugin for appium Dec 05, 2019 N/A N/A :pypi:`pytest-approvaltests` A plugin to use approvaltests with pytest May 08, 2022 4 - Beta pytest (>=7.0.1) - :pypi:`pytest-approvaltests-geo` Extension for ApprovalTests.Python specific to geo data verification Dec 12, 2023 5 - Production/Stable pytest + :pypi:`pytest-approvaltests-geo` Extension for ApprovalTests.Python specific to geo data verification Feb 05, 2024 5 - Production/Stable pytest :pypi:`pytest-archon` Rule your architecture like a real developer Dec 18, 2023 5 - Production/Stable pytest >=7.2 :pypi:`pytest-argus` pyest results colection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) :pypi:`pytest-arraydiff` pytest plugin to help with comparing array output from tests Nov 27, 2023 4 - Beta pytest >=4.6 @@ -105,7 +105,7 @@ This list contains 1367 plugins. :pypi:`pytest-astropy-header` pytest plugin to add diagnostic information to the header of the test output Sep 06, 2022 3 - Alpha pytest (>=4.6) :pypi:`pytest-ast-transformer` May 04, 2019 3 - Alpha pytest :pypi:`pytest-async-generators` Pytest fixtures for async generators Jul 05, 2023 N/A N/A - :pypi:`pytest-asyncio` Pytest support for asyncio Jan 28, 2024 4 - Beta pytest <8,>=7.0.0 + :pypi:`pytest-asyncio` Pytest support for asyncio Feb 09, 2024 4 - Beta pytest <9,>=7.0.0 :pypi:`pytest-asyncio-cooperative` Run all your asynchronous tests cooperatively. Nov 30, 2023 N/A N/A :pypi:`pytest-asyncio-network-simulator` pytest-asyncio-network-simulator: Plugin for pytest for simulator the network in tests Jul 31, 2018 3 - Alpha pytest (<3.7.0,>=3.3.2) :pypi:`pytest-async-mongodb` pytest plugin for async MongoDB Oct 18, 2017 5 - Production/Stable pytest (>=2.5.2) @@ -209,7 +209,7 @@ This list contains 1367 plugins. :pypi:`pytest-check-mk` pytest plugin to test Check_MK checks Nov 19, 2015 4 - Beta pytest :pypi:`pytest-check-requirements` A package to prevent Dependency Confusion attacks against Yandex. Feb 10, 2023 N/A N/A :pypi:`pytest-chic-report` A pytest plugin to send a report and printing summary of tests. Jan 31, 2023 5 - Production/Stable N/A - :pypi:`pytest-choose` Provide the pytest with the ability to collect use cases based on rules in text files Dec 26, 2023 N/A pytest >=7.0.0 + :pypi:`pytest-choose` Provide the pytest with the ability to collect use cases based on rules in text files Feb 04, 2024 N/A pytest >=7.0.0 :pypi:`pytest-chunks` Run only a chunk of your test suite Jul 05, 2022 N/A pytest (>=6.0.0) :pypi:`pytest-circleci` py.test plugin for CircleCI May 03, 2019 N/A N/A :pypi:`pytest-circleci-parallelized` Parallelize pytest across CircleCI workers. Oct 20, 2022 N/A N/A @@ -320,7 +320,7 @@ This list contains 1367 plugins. :pypi:`pytest-dependency` Manage dependencies of tests Dec 31, 2023 4 - Beta N/A :pypi:`pytest-depends` Tests that depend on other tests Apr 05, 2020 5 - Production/Stable pytest (>=3) :pypi:`pytest-deprecate` Mark tests as testing a deprecated feature with a warning note. Jul 01, 2019 N/A N/A - :pypi:`pytest-describe` Describe-style plugin for pytest Apr 09, 2023 5 - Production/Stable pytest (<8,>=4.6) + :pypi:`pytest-describe` Describe-style plugin for pytest Feb 10, 2024 5 - Production/Stable pytest <9,>=4.6 :pypi:`pytest-describe-it` plugin for rich text descriptions Jul 19, 2019 4 - Beta pytest :pypi:`pytest-devpi-server` DevPI server fixture for py.test May 28, 2019 5 - Production/Stable pytest :pypi:`pytest-dhos` Common fixtures for pytest in DHOS services and libraries Sep 07, 2022 N/A N/A @@ -532,7 +532,7 @@ This list contains 1367 plugins. :pypi:`pytest-funparam` An alternative way to parametrize test cases. Dec 02, 2021 4 - Beta pytest >=4.6.0 :pypi:`pytest-fxa` pytest plugin for Firefox Accounts Aug 28, 2018 5 - Production/Stable N/A :pypi:`pytest-fxtest` Oct 27, 2020 N/A N/A - :pypi:`pytest-fzf` fzf-based test selector for pytest Dec 15, 2023 4 - Beta pytest >=6.0.0 + :pypi:`pytest-fzf` fzf-based test selector for pytest Feb 07, 2024 4 - Beta pytest >=6.0.0 :pypi:`pytest-gather-fixtures` set up asynchronous pytest fixtures concurrently Apr 12, 2022 N/A pytest (>=6.0.0) :pypi:`pytest-gc` The garbage collector plugin for py.test Feb 01, 2018 N/A N/A :pypi:`pytest-gcov` Uses gcov to measure test coverage of a C library Feb 01, 2018 3 - Alpha N/A @@ -568,7 +568,7 @@ This list contains 1367 plugins. :pypi:`pytest-harmony` Chain tests and data with pytest Jan 17, 2023 N/A pytest (>=7.2.1,<8.0.0) :pypi:`pytest-harvest` Store data created during your pytest tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes. Jun 10, 2022 5 - Production/Stable N/A :pypi:`pytest-helm-chart` A plugin to provide different types and configs of Kubernetes clusters that can be used for testing. Jun 15, 2020 4 - Beta pytest (>=5.4.2,<6.0.0) - :pypi:`pytest-helm-charts` A plugin to provide different types and configs of Kubernetes clusters that can be used for testing. Sep 13, 2023 4 - Beta pytest (>=7.1.2,<8.0.0) + :pypi:`pytest-helm-charts` A plugin to provide different types and configs of Kubernetes clusters that can be used for testing. Feb 07, 2024 4 - Beta pytest (>=8.0.0,<9.0.0) :pypi:`pytest-helper` Functions to help in using the pytest testing framework May 31, 2019 5 - Production/Stable N/A :pypi:`pytest-helpers` pytest helpers May 17, 2020 N/A pytest :pypi:`pytest-helpers-namespace` Pytest Helpers Namespace Plugin Dec 29, 2021 5 - Production/Stable pytest (>=6.0.0) @@ -579,12 +579,12 @@ This list contains 1367 plugins. :pypi:`pytest-history` Pytest plugin to keep a history of your pytest runs Jan 14, 2024 N/A pytest (>=7.4.3,<8.0.0) :pypi:`pytest-home` Home directory fixtures Oct 09, 2023 5 - Production/Stable pytest :pypi:`pytest-homeassistant` A pytest plugin for use with homeassistant custom components. Aug 12, 2020 4 - Beta N/A - :pypi:`pytest-homeassistant-custom-component` Experimental package to automatically extract test plugins for Home Assistant custom components Feb 03, 2024 3 - Alpha pytest ==7.4.4 + :pypi:`pytest-homeassistant-custom-component` Experimental package to automatically extract test plugins for Home Assistant custom components Feb 10, 2024 3 - Alpha pytest ==7.4.4 :pypi:`pytest-honey` A simple plugin to use with pytest Jan 07, 2022 4 - Beta pytest (>=3.5.0) :pypi:`pytest-honors` Report on tests that honor constraints, and guard against regressions Mar 06, 2020 4 - Beta N/A :pypi:`pytest-hot-reloading` Jan 06, 2024 N/A N/A :pypi:`pytest-hot-test` A plugin that tracks test changes Dec 10, 2022 4 - Beta pytest (>=3.5.0) - :pypi:`pytest-houdini` pytest plugin for testing code in Houdini. Dec 25, 2023 N/A pytest + :pypi:`pytest-houdini` pytest plugin for testing code in Houdini. Feb 09, 2024 N/A pytest :pypi:`pytest-hoverfly` Simplify working with Hoverfly from pytest Jan 30, 2023 N/A pytest (>=5.0) :pypi:`pytest-hoverfly-wrapper` Integrates the Hoverfly HTTP proxy into Pytest Feb 27, 2023 5 - Production/Stable pytest (>=3.7.0) :pypi:`pytest-hpfeeds` Helpers for testing hpfeeds in your python project Feb 28, 2023 4 - Beta pytest (>=6.2.4,<7.0.0) @@ -629,7 +629,7 @@ This list contains 1367 plugins. :pypi:`pytest-ini` Reuse pytest.ini to store env variables Apr 26, 2022 N/A N/A :pypi:`pytest-inline` A pytest plugin for writing inline tests. Oct 19, 2023 4 - Beta pytest >=7.0.0 :pypi:`pytest-inmanta` A py.test plugin providing fixtures to simplify inmanta modules testing. Dec 13, 2023 5 - Production/Stable pytest - :pypi:`pytest-inmanta-extensions` Inmanta tests package Jan 04, 2024 5 - Production/Stable N/A + :pypi:`pytest-inmanta-extensions` Inmanta tests package Feb 09, 2024 5 - Production/Stable N/A :pypi:`pytest-inmanta-lsm` Common fixtures for inmanta LSM related modules Nov 29, 2023 5 - Production/Stable N/A :pypi:`pytest-inmanta-yang` Common fixtures used in inmanta yang related modules Jun 16, 2022 4 - Beta N/A :pypi:`pytest-Inomaly` A simple image diff plugin for pytest Feb 13, 2018 4 - Beta N/A @@ -641,7 +641,7 @@ This list contains 1367 plugins. :pypi:`pytest-integration-mark` Automatic integration test marking and excluding plugin for pytest May 22, 2023 N/A pytest (>=5.2) :pypi:`pytest-interactive` A pytest plugin for console based interactive test selection just after the collection phase Nov 30, 2017 3 - Alpha N/A :pypi:`pytest-intercept-remote` Pytest plugin for intercepting outgoing connection requests during pytest run. May 24, 2021 4 - Beta pytest (>=4.6) - :pypi:`pytest-interface-tester` Pytest plugin for checking charm relation interface protocol compliance. Jan 26, 2024 4 - Beta pytest + :pypi:`pytest-interface-tester` Pytest plugin for checking charm relation interface protocol compliance. Feb 09, 2024 4 - Beta pytest :pypi:`pytest-invenio` Pytest fixtures for Invenio. Jan 29, 2024 5 - Production/Stable pytest <7.2.0,>=6 :pypi:`pytest-involve` Run tests covering a specific file or changeset Feb 02, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-ipdb` A py.test plug-in to enable drop to ipdb debugger on test failure. Mar 20, 2013 2 - Pre-Alpha N/A @@ -690,7 +690,7 @@ This list contains 1367 plugins. :pypi:`pytest-launchable` Launchable Pytest Plugin Apr 05, 2023 N/A pytest (>=4.2.0) :pypi:`pytest-layab` Pytest fixtures for layab. Oct 05, 2020 5 - Production/Stable N/A :pypi:`pytest-lazy-fixture` It helps to use fixtures in pytest.mark.parametrize Feb 01, 2020 4 - Beta pytest (>=3.2.5) - :pypi:`pytest-lazy-fixtures` Allows you to use fixtures in @pytest.mark.parametrize. Feb 01, 2024 N/A pytest (>=7) + :pypi:`pytest-lazy-fixtures` Allows you to use fixtures in @pytest.mark.parametrize. Feb 06, 2024 N/A pytest (>=7) :pypi:`pytest-ldap` python-ldap fixtures for pytest Aug 18, 2020 N/A pytest :pypi:`pytest-leak-finder` Find the test that's leaking before the one that fails Feb 15, 2023 4 - Beta pytest (>=3.5.0) :pypi:`pytest-leaks` A pytest plugin to trace resource leaks. Nov 27, 2019 1 - Planning N/A @@ -711,7 +711,7 @@ This list contains 1367 plugins. :pypi:`pytest-localftpserver` A PyTest plugin which provides an FTP fixture for your tests Oct 14, 2023 5 - Production/Stable pytest :pypi:`pytest-localserver` pytest plugin to test server connections locally. Oct 12, 2023 4 - Beta N/A :pypi:`pytest-localstack` Pytest plugin for AWS integration tests Jun 07, 2023 4 - Beta pytest (>=6.0.0,<7.0.0) - :pypi:`pytest-lock` pytest-lock is a pytest plugin that allows you to "lock" the results of unit tests, storing them in a local cache. This is particularly useful for tests that are resource-intensive or don't need to be run every time. When the tests are run subsequently, pytest-lock will compare the current results with the locked results and issue a warning if there are any discrepancies. Jan 27, 2024 N/A pytest (>=7.4.3,<8.0.0) + :pypi:`pytest-lock` pytest-lock is a pytest plugin that allows you to "lock" the results of unit tests, storing them in a local cache. This is particularly useful for tests that are resource-intensive or don't need to be run every time. When the tests are run subsequently, pytest-lock will compare the current results with the locked results and issue a warning if there are any discrepancies. Feb 03, 2024 N/A pytest (>=7.4.3,<8.0.0) :pypi:`pytest-lockable` lockable resource plugin for pytest Jan 24, 2024 5 - Production/Stable pytest :pypi:`pytest-locker` Used to lock object during testing. Essentially changing assertions from being hard coded to asserting that nothing changed Oct 29, 2021 N/A pytest (>=5.4) :pypi:`pytest-log` print log Aug 15, 2021 N/A pytest (>=3.8) @@ -721,15 +721,15 @@ This list contains 1367 plugins. :pypi:`pytest-logger` Plugin configuring handlers for loggers from Python logging module. Jul 25, 2019 4 - Beta pytest (>=3.2) :pypi:`pytest-logging` Configures logging and allows tweaking the log level with a py.test flag Nov 04, 2015 4 - Beta N/A :pypi:`pytest-logging-end-to-end-test-tool` Sep 23, 2022 N/A pytest (>=7.1.2,<8.0.0) - :pypi:`pytest-logikal` Common testing environment Jan 27, 2024 5 - Production/Stable pytest ==7.4.4 + :pypi:`pytest-logikal` Common testing environment Feb 05, 2024 5 - Production/Stable pytest ==8.0.0 :pypi:`pytest-log-report` Package for creating a pytest test run reprot Dec 26, 2019 N/A N/A :pypi:`pytest-loguru` Pytest Loguru Oct 04, 2023 5 - Production/Stable pytest :pypi:`pytest-loop` pytest plugin for looping tests Jul 22, 2022 5 - Production/Stable pytest (>=6) - :pypi:`pytest-lsp` A pytest plugin for end-to-end testing of language servers Nov 13, 2023 3 - Alpha pytest + :pypi:`pytest-lsp` A pytest plugin for end-to-end testing of language servers Feb 07, 2024 3 - Alpha pytest :pypi:`pytest-manual-marker` pytest marker for marking manual tests Aug 04, 2022 3 - Alpha pytest>=7 :pypi:`pytest-markdoctest` A pytest plugin to doctest your markdown files Jul 22, 2022 4 - Beta pytest (>=6) :pypi:`pytest-markdown` Test your markdown docs with pytest Jan 15, 2021 4 - Beta pytest (>=6.0.1,<7.0.0) - :pypi:`pytest-markdown-docs` Run markdown code fences through pytest Mar 09, 2023 N/A N/A + :pypi:`pytest-markdown-docs` Run markdown code fences through pytest Feb 07, 2024 N/A pytest (>=7.0.0) :pypi:`pytest-marker-bugzilla` py.test bugzilla integration plugin, using markers Jan 09, 2020 N/A N/A :pypi:`pytest-markers-presence` A simple plugin to detect missed pytest tags and markers" Feb 04, 2021 4 - Beta pytest (>=6.0) :pypi:`pytest-markfiltration` UNKNOWN Nov 08, 2011 3 - Alpha N/A @@ -744,7 +744,7 @@ This list contains 1367 plugins. :pypi:`pytest-maybe-raises` Pytest fixture for optional exception testing. May 27, 2022 N/A pytest ; extra == 'dev' :pypi:`pytest-mccabe` pytest plugin to run the mccabe code complexity checker. Jul 22, 2020 3 - Alpha pytest (>=5.4.0) :pypi:`pytest-md` Plugin for generating Markdown reports for pytest results Jul 11, 2019 3 - Alpha pytest (>=4.2.1) - :pypi:`pytest-md-report` A pytest plugin to make a test results report with Markdown table format. Oct 08, 2023 4 - Beta pytest !=6.0.0,<8,>=3.3.2 + :pypi:`pytest-md-report` A pytest plugin to make a test results report with Markdown table format. Feb 04, 2024 4 - Beta pytest !=6.0.0,<9,>=3.3.2 :pypi:`pytest-meilisearch` Pytest helpers for testing projects using Meilisearch Jan 19, 2024 N/A pytest (>=7.4.3) :pypi:`pytest-memlog` Log memory usage during tests May 03, 2023 N/A pytest (>=7.3.0,<8.0.0) :pypi:`pytest-memprof` Estimates memory consumption of test functions Mar 29, 2019 4 - Beta N/A @@ -863,7 +863,7 @@ This list contains 1367 plugins. :pypi:`pytest-parallelize-tests` pytest plugin that parallelizes test execution across multiple hosts Jan 27, 2023 4 - Beta N/A :pypi:`pytest-param` pytest plugin to test all, first, last or random params Sep 11, 2016 4 - Beta pytest (>=2.6.0) :pypi:`pytest-paramark` Configure pytest fixtures using a combination of"parametrize" and markers Jan 10, 2020 4 - Beta pytest (>=4.5.0) - :pypi:`pytest-parameterize-from-files` A pytest plugin that parameterizes tests from data files. Jan 27, 2024 4 - Beta pytest>=7.2.0 + :pypi:`pytest-parameterize-from-files` A pytest plugin that parameterizes tests from data files. Feb 09, 2024 4 - Beta pytest>=7.2.0 :pypi:`pytest-parametrization` Simpler PyTest parametrization May 22, 2022 5 - Production/Stable N/A :pypi:`pytest-parametrize-cases` A more user-friendly way to write parametrized tests. Mar 13, 2022 N/A pytest (>=6.1.2) :pypi:`pytest-parametrized` Pytest decorator for parametrizing tests with default iterables. Nov 03, 2023 5 - Production/Stable pytest @@ -901,7 +901,7 @@ This list contains 1367 plugins. :pypi:`pytest-play` pytest plugin that let you automate actions and assertions with test metrics reporting executing plain YAML files Jun 12, 2019 5 - Production/Stable N/A :pypi:`pytest-playbook` Pytest plugin for reading playbooks. Jan 21, 2021 3 - Alpha pytest (>=6.1.2,<7.0.0) :pypi:`pytest-playwright` A pytest wrapper with fixtures for Playwright to automate web browsers Feb 02, 2024 N/A pytest (<9.0.0,>=6.2.4) - :pypi:`pytest-playwright-async` ASYNC Pytest plugin for Playwright Jul 03, 2023 N/A N/A + :pypi:`pytest-playwright-async` ASYNC Pytest plugin for Playwright Feb 06, 2024 N/A N/A :pypi:`pytest-playwright-asyncio` Aug 29, 2023 N/A N/A :pypi:`pytest-playwrights` A pytest wrapper with fixtures for Playwright to automate web browsers Dec 02, 2021 N/A N/A :pypi:`pytest-playwright-snapshot` A pytest wrapper for snapshot testing with playwright Aug 19, 2021 N/A N/A @@ -960,7 +960,7 @@ This list contains 1367 plugins. :pypi:`pytest-pyq` Pytest fixture "q" for pyq Mar 10, 2020 5 - Production/Stable N/A :pypi:`pytest-pyramid` pytest_pyramid - provides fixtures for testing pyramid applications with pytest test suite Oct 11, 2023 5 - Production/Stable pytest :pypi:`pytest-pyramid-server` Pyramid server fixture for py.test May 28, 2019 5 - Production/Stable pytest - :pypi:`pytest-pyreport` PyReport is a lightweight reporting plugin for Pytest that provides concise HTML report Nov 03, 2023 N/A pytest + :pypi:`pytest-pyreport` PyReport is a lightweight reporting plugin for Pytest that provides concise HTML report Feb 03, 2024 N/A pytest :pypi:`pytest-pyright` Pytest plugin for type checking code with Pyright Jan 26, 2024 4 - Beta pytest >=7.0.0 :pypi:`pytest-pyspec` A plugin that transforms the pytest output into a result similar to the RSpec. It enables the use of docstrings to display results and also enables the use of the prefixes "describe", "with" and "it". Jan 02, 2024 N/A pytest (>=7.2.1,<8.0.0) :pypi:`pytest-pystack` Plugin to run pystack after a timeout for a test suite. Jan 04, 2024 N/A pytest >=3.5.0 @@ -974,7 +974,7 @@ This list contains 1367 plugins. :pypi:`pytest-qgis` A pytest plugin for testing QGIS python plugins Nov 29, 2023 5 - Production/Stable pytest >=6.0 :pypi:`pytest-qml` Run QML Tests with pytest Dec 02, 2020 4 - Beta pytest (>=6.0.0) :pypi:`pytest-qr` pytest plugin to generate test result QR codes Nov 25, 2021 4 - Beta N/A - :pypi:`pytest-qt` pytest support for PyQt and PySide applications Dec 22, 2023 5 - Production/Stable pytest >=3.0.0 + :pypi:`pytest-qt` pytest support for PyQt and PySide applications Feb 07, 2024 5 - Production/Stable pytest :pypi:`pytest-qt-app` QT app fixture for py.test Dec 23, 2015 5 - Production/Stable N/A :pypi:`pytest-quarantine` A plugin for pytest to manage expected test failures Nov 24, 2019 5 - Production/Stable pytest (>=4.6) :pypi:`pytest-quickcheck` pytest plugin to generate random data inspired by QuickCheck Nov 05, 2022 4 - Beta pytest (>=4.0) @@ -1024,7 +1024,7 @@ This list contains 1367 plugins. :pypi:`pytest-reportlog` Replacement for the --resultlog option, focused in simplicity and extensibility May 22, 2023 3 - Alpha pytest :pypi:`pytest-report-me` A pytest plugin to generate report. Dec 31, 2020 N/A pytest :pypi:`pytest-report-parameters` pytest plugin for adding tests' parameters to junit report Jun 18, 2020 3 - Alpha pytest (>=2.4.2) - :pypi:`pytest-reportportal` Agent for Reporting results of tests to the Report Portal Dec 06, 2023 N/A pytest >=3.8.0 + :pypi:`pytest-reportportal` Agent for Reporting results of tests to the Report Portal Feb 05, 2024 N/A pytest <8.0.0,>=3.8.0 :pypi:`pytest-report-stream` A pytest plugin which allows to stream test reports at runtime Oct 22, 2023 4 - Beta N/A :pypi:`pytest-reqs` pytest plugin to check pinned requirements May 12, 2019 N/A pytest (>=2.4.2) :pypi:`pytest-requests` A simple plugin to use with pytest Jun 24, 2019 4 - Beta pytest (>=3.5.0) @@ -1036,7 +1036,7 @@ This list contains 1367 plugins. :pypi:`pytest-rerun-all` Rerun testsuite for a certain time or iterations Nov 16, 2023 3 - Alpha pytest (>=7.0.0) :pypi:`pytest-rerunfailures` pytest plugin to re-run tests to eliminate flaky failures Nov 22, 2023 5 - Production/Stable pytest >=7 :pypi:`pytest-rerunfailures-all-logs` pytest plugin to re-run tests to eliminate flaky failures Mar 07, 2022 5 - Production/Stable N/A - :pypi:`pytest-reserial` Pytest fixture for recording and replaying serial port traffic. Aug 31, 2023 4 - Beta pytest + :pypi:`pytest-reserial` Pytest fixture for recording and replaying serial port traffic. Feb 08, 2024 4 - Beta pytest :pypi:`pytest-resilient-circuits` Resilient Circuits fixtures for PyTest Jan 10, 2024 N/A pytest ~=4.6 ; python_version == "2.7" :pypi:`pytest-resource` Load resource fixture plugin to use with pytest Nov 14, 2018 4 - Beta N/A :pypi:`pytest-resource-path` Provides path for uniform access to test resources in isolated directory May 01, 2021 5 - Production/Stable pytest (>=3.5.0) @@ -1049,7 +1049,7 @@ This list contains 1367 plugins. :pypi:`pytest-result-sender` Apr 20, 2023 N/A pytest>=7.3.1 :pypi:`pytest-resume` A Pytest plugin to resuming from the last run test Apr 22, 2023 4 - Beta pytest (>=7.0) :pypi:`pytest-rethinkdb` A RethinkDB plugin for pytest. Jul 24, 2016 4 - Beta N/A - :pypi:`pytest-retry` Adds the ability to retry flaky tests in CI environments Jan 04, 2024 N/A pytest >=7.0.0 + :pypi:`pytest-retry` Adds the ability to retry flaky tests in CI environments Feb 04, 2024 N/A pytest >=7.0.0 :pypi:`pytest-retry-class` A pytest plugin to rerun entire class on failure Mar 25, 2023 N/A pytest (>=5.3) :pypi:`pytest-reusable-testcases` Apr 28, 2023 N/A N/A :pypi:`pytest-reverse` Pytest plugin to reverse test order. Jul 10, 2023 5 - Production/Stable pytest @@ -1157,7 +1157,7 @@ This list contains 1367 plugins. :pypi:`pytest-spec` Library pytest-spec is a pytest plugin to display test execution output like a SPECIFICATION. May 04, 2021 N/A N/A :pypi:`pytest-spec2md` Library pytest-spec2md is a pytest plugin to create a markdown specification while running pytest. Nov 21, 2023 N/A pytest (>7.0) :pypi:`pytest-speed` Modern benchmarking library for python with pytest integration. Jan 22, 2023 3 - Alpha pytest>=7 - :pypi:`pytest-sphinx` Doctest plugin for pytest with support for Sphinx-specific doctest-directives Sep 06, 2022 4 - Beta pytest (>=7.0.0) + :pypi:`pytest-sphinx` Doctest plugin for pytest with support for Sphinx-specific doctest-directives Feb 03, 2024 4 - Beta pytest >=8.0.0 :pypi:`pytest-spiratest` Exports unit tests as test runs in Spira (SpiraTest/Team/Plan) Jan 01, 2024 N/A N/A :pypi:`pytest-splinter` Splinter plugin for pytest testing framework Sep 09, 2022 6 - Mature pytest (>=3.0.0) :pypi:`pytest-splinter4` Pytest plugin for the splinter automation library Feb 01, 2024 6 - Mature pytest >=8.0.0 @@ -1185,11 +1185,11 @@ This list contains 1367 plugins. :pypi:`pytest-stepfunctions` A small description May 08, 2021 4 - Beta pytest :pypi:`pytest-steps` Create step-wise / incremental tests in pytest. Sep 23, 2021 5 - Production/Stable N/A :pypi:`pytest-stepwise` Run a test suite one failing test at a time. Dec 01, 2015 4 - Beta N/A - :pypi:`pytest-stf` pytest plugin for openSTF Oct 10, 2023 N/A pytest >=5.0 + :pypi:`pytest-stf` pytest plugin for openSTF Feb 08, 2024 N/A pytest >=5.0 :pypi:`pytest-stoq` A plugin to pytest stoq Feb 09, 2021 4 - Beta N/A :pypi:`pytest-store` Pytest plugin to store values from test runs Nov 16, 2023 3 - Alpha pytest (>=7.0.0) :pypi:`pytest-stress` A Pytest plugin that allows you to loop tests for a user defined amount of time. Dec 07, 2019 4 - Beta pytest (>=3.6.0) - :pypi:`pytest-structlog` Structured logging assertions Dec 18, 2022 N/A pytest + :pypi:`pytest-structlog` Structured logging assertions Feb 04, 2024 N/A pytest :pypi:`pytest-structmpd` provide structured temporary directory Oct 17, 2018 N/A N/A :pypi:`pytest-stub` Stub packages, modules and attributes. Apr 28, 2020 5 - Production/Stable N/A :pypi:`pytest-stubprocess` Provide stub implementations for subprocesses in Python tests Sep 17, 2018 3 - Alpha pytest (>=3.5.0) @@ -1255,7 +1255,7 @@ This list contains 1367 plugins. :pypi:`pytest-testreport-new` Oct 07, 2023 4 - Beta pytest >=3.5.0 :pypi:`pytest-testslide` TestSlide fixture for pytest Jan 07, 2021 5 - Production/Stable pytest (~=6.2) :pypi:`pytest-test-this` Plugin for py.test to run relevant tests, based on naively checking if a test contains a reference to the symbol you supply Sep 15, 2019 2 - Pre-Alpha pytest (>=2.3) - :pypi:`pytest-test-utils` Jul 14, 2022 N/A pytest (>=5) + :pypi:`pytest-test-utils` Feb 08, 2024 N/A pytest >=3.9 :pypi:`pytest-tesults` Tesults plugin for pytest Jul 21, 2023 5 - Production/Stable pytest (>=3.5.0) :pypi:`pytest-textual-snapshot` Snapshot testing for Textual apps Aug 23, 2023 4 - Beta pytest (>=7.0.0) :pypi:`pytest-tezos` pytest-ligo Jan 16, 2020 4 - Beta N/A @@ -1274,8 +1274,8 @@ This list contains 1367 plugins. :pypi:`pytest-timestamps` A simple plugin to view timestamps for each test Sep 11, 2023 N/A pytest (>=7.3,<8.0) :pypi:`pytest-tiny-api-client` The companion pytest plugin for tiny-api-client Jan 04, 2024 5 - Production/Stable pytest :pypi:`pytest-tinybird` A pytest plugin to report test results to tinybird Jun 26, 2023 4 - Beta pytest (>=3.8.0) - :pypi:`pytest-tipsi-django` Nov 17, 2021 4 - Beta pytest (>=6.0.0) - :pypi:`pytest-tipsi-testing` Better fixtures management. Various helpers Nov 04, 2020 4 - Beta pytest (>=3.3.0) + :pypi:`pytest-tipsi-django` Better fixtures for django Feb 05, 2024 5 - Production/Stable pytest>=6.0.0 + :pypi:`pytest-tipsi-testing` Better fixtures management. Various helpers Feb 04, 2024 5 - Production/Stable pytest>=3.3.0 :pypi:`pytest-tldr` A pytest plugin that limits the output to just the things you need. Oct 26, 2022 4 - Beta pytest (>=3.5.0) :pypi:`pytest-tm4j-reporter` Cloud Jira Test Management (TM4J) PyTest reporter plugin Sep 01, 2020 N/A pytest :pypi:`pytest-tmnet` A small example package Mar 01, 2022 N/A N/A @@ -1336,7 +1336,7 @@ This list contains 1367 plugins. :pypi:`pytest-vcrpandas` Test from HTTP interactions to dataframe processed. Jan 12, 2019 4 - Beta pytest :pypi:`pytest-vcs` Sep 22, 2022 4 - Beta N/A :pypi:`pytest-venv` py.test fixture for creating a virtual environment Nov 23, 2023 4 - Beta pytest - :pypi:`pytest-ver` Pytest module with Verification Protocol, Verification Report and Trace Matrix Dec 19, 2023 4 - Beta pytest + :pypi:`pytest-ver` Pytest module with Verification Protocol, Verification Report and Trace Matrix Feb 07, 2024 4 - Beta pytest :pypi:`pytest-verbose-parametrize` More descriptive output for parametrized py.test tests May 28, 2019 5 - Production/Stable pytest :pypi:`pytest-vimqf` A simple pytest plugin that will shrink pytest output when specified, to fit vim quickfix window. Feb 08, 2021 4 - Beta pytest (>=6.2.2,<7.0.0) :pypi:`pytest-virtualenv` Virtualenv fixture for py.test May 28, 2019 5 - Production/Stable pytest @@ -1352,7 +1352,7 @@ This list contains 1367 plugins. :pypi:`pytest-wa-e2e-plugin` Pytest plugin for testing whatsapp bots with end to end tests Feb 18, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-wake` Nov 07, 2023 N/A pytest :pypi:`pytest-watch` Local continuous test runner with pytest and watchdog. May 20, 2018 N/A N/A - :pypi:`pytest-watcher` Automatically rerun your tests on file modifications Jan 28, 2024 4 - Beta N/A + :pypi:`pytest-watcher` Automatically rerun your tests on file modifications Feb 06, 2024 4 - Beta N/A :pypi:`pytest-wdl` Pytest plugin for testing WDL workflows. Nov 17, 2020 5 - Production/Stable N/A :pypi:`pytest-web3-data` A pytest plugin to fetch test data from IPFS HTTP gateways during pytest execution. Oct 04, 2023 4 - Beta pytest :pypi:`pytest-webdriver` Selenium webdriver fixture for py.test May 28, 2019 5 - Production/Stable pytest @@ -1638,7 +1638,7 @@ This list contains 1367 plugins. Static code checks used at Alphamoon :pypi:`pytest-analyzer` - *last release*: Dec 06, 2023, + *last release*: Feb 06, 2024, *status*: N/A, *requires*: pytest >=7.3.1 @@ -1771,7 +1771,7 @@ This list contains 1367 plugins. A plugin to use approvaltests with pytest :pypi:`pytest-approvaltests-geo` - *last release*: Dec 12, 2023, + *last release*: Feb 05, 2024, *status*: 5 - Production/Stable, *requires*: pytest @@ -1904,9 +1904,9 @@ This list contains 1367 plugins. Pytest fixtures for async generators :pypi:`pytest-asyncio` - *last release*: Jan 28, 2024, + *last release*: Feb 09, 2024, *status*: 4 - Beta, - *requires*: pytest <8,>=7.0.0 + *requires*: pytest <9,>=7.0.0 Pytest support for asyncio @@ -2632,7 +2632,7 @@ This list contains 1367 plugins. A pytest plugin to send a report and printing summary of tests. :pypi:`pytest-choose` - *last release*: Dec 26, 2023, + *last release*: Feb 04, 2024, *status*: N/A, *requires*: pytest >=7.0.0 @@ -3409,9 +3409,9 @@ This list contains 1367 plugins. Mark tests as testing a deprecated feature with a warning note. :pypi:`pytest-describe` - *last release*: Apr 09, 2023, + *last release*: Feb 10, 2024, *status*: 5 - Production/Stable, - *requires*: pytest (<8,>=4.6) + *requires*: pytest <9,>=4.6 Describe-style plugin for pytest @@ -4893,7 +4893,7 @@ This list contains 1367 plugins. :pypi:`pytest-fzf` - *last release*: Dec 15, 2023, + *last release*: Feb 07, 2024, *status*: 4 - Beta, *requires*: pytest >=6.0.0 @@ -5145,9 +5145,9 @@ This list contains 1367 plugins. A plugin to provide different types and configs of Kubernetes clusters that can be used for testing. :pypi:`pytest-helm-charts` - *last release*: Sep 13, 2023, + *last release*: Feb 07, 2024, *status*: 4 - Beta, - *requires*: pytest (>=7.1.2,<8.0.0) + *requires*: pytest (>=8.0.0,<9.0.0) A plugin to provide different types and configs of Kubernetes clusters that can be used for testing. @@ -5222,7 +5222,7 @@ This list contains 1367 plugins. A pytest plugin for use with homeassistant custom components. :pypi:`pytest-homeassistant-custom-component` - *last release*: Feb 03, 2024, + *last release*: Feb 10, 2024, *status*: 3 - Alpha, *requires*: pytest ==7.4.4 @@ -5257,7 +5257,7 @@ This list contains 1367 plugins. A plugin that tracks test changes :pypi:`pytest-houdini` - *last release*: Dec 25, 2023, + *last release*: Feb 09, 2024, *status*: N/A, *requires*: pytest @@ -5572,7 +5572,7 @@ This list contains 1367 plugins. A py.test plugin providing fixtures to simplify inmanta modules testing. :pypi:`pytest-inmanta-extensions` - *last release*: Jan 04, 2024, + *last release*: Feb 09, 2024, *status*: 5 - Production/Stable, *requires*: N/A @@ -5656,7 +5656,7 @@ This list contains 1367 plugins. Pytest plugin for intercepting outgoing connection requests during pytest run. :pypi:`pytest-interface-tester` - *last release*: Jan 26, 2024, + *last release*: Feb 09, 2024, *status*: 4 - Beta, *requires*: pytest @@ -5999,7 +5999,7 @@ This list contains 1367 plugins. It helps to use fixtures in pytest.mark.parametrize :pypi:`pytest-lazy-fixtures` - *last release*: Feb 01, 2024, + *last release*: Feb 06, 2024, *status*: N/A, *requires*: pytest (>=7) @@ -6146,7 +6146,7 @@ This list contains 1367 plugins. Pytest plugin for AWS integration tests :pypi:`pytest-lock` - *last release*: Jan 27, 2024, + *last release*: Feb 03, 2024, *status*: N/A, *requires*: pytest (>=7.4.3,<8.0.0) @@ -6216,9 +6216,9 @@ This list contains 1367 plugins. :pypi:`pytest-logikal` - *last release*: Jan 27, 2024, + *last release*: Feb 05, 2024, *status*: 5 - Production/Stable, - *requires*: pytest ==7.4.4 + *requires*: pytest ==8.0.0 Common testing environment @@ -6244,7 +6244,7 @@ This list contains 1367 plugins. pytest plugin for looping tests :pypi:`pytest-lsp` - *last release*: Nov 13, 2023, + *last release*: Feb 07, 2024, *status*: 3 - Alpha, *requires*: pytest @@ -6272,9 +6272,9 @@ This list contains 1367 plugins. Test your markdown docs with pytest :pypi:`pytest-markdown-docs` - *last release*: Mar 09, 2023, + *last release*: Feb 07, 2024, *status*: N/A, - *requires*: N/A + *requires*: pytest (>=7.0.0) Run markdown code fences through pytest @@ -6377,9 +6377,9 @@ This list contains 1367 plugins. Plugin for generating Markdown reports for pytest results :pypi:`pytest-md-report` - *last release*: Oct 08, 2023, + *last release*: Feb 04, 2024, *status*: 4 - Beta, - *requires*: pytest !=6.0.0,<8,>=3.3.2 + *requires*: pytest !=6.0.0,<9,>=3.3.2 A pytest plugin to make a test results report with Markdown table format. @@ -7210,7 +7210,7 @@ This list contains 1367 plugins. Configure pytest fixtures using a combination of"parametrize" and markers :pypi:`pytest-parameterize-from-files` - *last release*: Jan 27, 2024, + *last release*: Feb 09, 2024, *status*: 4 - Beta, *requires*: pytest>=7.2.0 @@ -7476,7 +7476,7 @@ This list contains 1367 plugins. A pytest wrapper with fixtures for Playwright to automate web browsers :pypi:`pytest-playwright-async` - *last release*: Jul 03, 2023, + *last release*: Feb 06, 2024, *status*: N/A, *requires*: N/A @@ -7889,7 +7889,7 @@ This list contains 1367 plugins. Pyramid server fixture for py.test :pypi:`pytest-pyreport` - *last release*: Nov 03, 2023, + *last release*: Feb 03, 2024, *status*: N/A, *requires*: pytest @@ -7987,9 +7987,9 @@ This list contains 1367 plugins. pytest plugin to generate test result QR codes :pypi:`pytest-qt` - *last release*: Dec 22, 2023, + *last release*: Feb 07, 2024, *status*: 5 - Production/Stable, - *requires*: pytest >=3.0.0 + *requires*: pytest pytest support for PyQt and PySide applications @@ -8337,9 +8337,9 @@ This list contains 1367 plugins. pytest plugin for adding tests' parameters to junit report :pypi:`pytest-reportportal` - *last release*: Dec 06, 2023, + *last release*: Feb 05, 2024, *status*: N/A, - *requires*: pytest >=3.8.0 + *requires*: pytest <8.0.0,>=3.8.0 Agent for Reporting results of tests to the Report Portal @@ -8421,7 +8421,7 @@ This list contains 1367 plugins. pytest plugin to re-run tests to eliminate flaky failures :pypi:`pytest-reserial` - *last release*: Aug 31, 2023, + *last release*: Feb 08, 2024, *status*: 4 - Beta, *requires*: pytest @@ -8512,7 +8512,7 @@ This list contains 1367 plugins. A RethinkDB plugin for pytest. :pypi:`pytest-retry` - *last release*: Jan 04, 2024, + *last release*: Feb 04, 2024, *status*: N/A, *requires*: pytest >=7.0.0 @@ -9268,9 +9268,9 @@ This list contains 1367 plugins. Modern benchmarking library for python with pytest integration. :pypi:`pytest-sphinx` - *last release*: Sep 06, 2022, + *last release*: Feb 03, 2024, *status*: 4 - Beta, - *requires*: pytest (>=7.0.0) + *requires*: pytest >=8.0.0 Doctest plugin for pytest with support for Sphinx-specific doctest-directives @@ -9464,7 +9464,7 @@ This list contains 1367 plugins. Run a test suite one failing test at a time. :pypi:`pytest-stf` - *last release*: Oct 10, 2023, + *last release*: Feb 08, 2024, *status*: N/A, *requires*: pytest >=5.0 @@ -9492,7 +9492,7 @@ This list contains 1367 plugins. A Pytest plugin that allows you to loop tests for a user defined amount of time. :pypi:`pytest-structlog` - *last release*: Dec 18, 2022, + *last release*: Feb 04, 2024, *status*: N/A, *requires*: pytest @@ -9954,9 +9954,9 @@ This list contains 1367 plugins. Plugin for py.test to run relevant tests, based on naively checking if a test contains a reference to the symbol you supply :pypi:`pytest-test-utils` - *last release*: Jul 14, 2022, + *last release*: Feb 08, 2024, *status*: N/A, - *requires*: pytest (>=5) + *requires*: pytest >=3.9 @@ -10087,16 +10087,16 @@ This list contains 1367 plugins. A pytest plugin to report test results to tinybird :pypi:`pytest-tipsi-django` - *last release*: Nov 17, 2021, - *status*: 4 - Beta, - *requires*: pytest (>=6.0.0) - + *last release*: Feb 05, 2024, + *status*: 5 - Production/Stable, + *requires*: pytest>=6.0.0 + Better fixtures for django :pypi:`pytest-tipsi-testing` - *last release*: Nov 04, 2020, - *status*: 4 - Beta, - *requires*: pytest (>=3.3.0) + *last release*: Feb 04, 2024, + *status*: 5 - Production/Stable, + *requires*: pytest>=3.3.0 Better fixtures management. Various helpers @@ -10521,7 +10521,7 @@ This list contains 1367 plugins. py.test fixture for creating a virtual environment :pypi:`pytest-ver` - *last release*: Dec 19, 2023, + *last release*: Feb 07, 2024, *status*: 4 - Beta, *requires*: pytest @@ -10633,7 +10633,7 @@ This list contains 1367 plugins. Local continuous test runner with pytest and watchdog. :pypi:`pytest-watcher` - *last release*: Jan 28, 2024, + *last release*: Feb 06, 2024, *status*: 4 - Beta, *requires*: N/A