Merge branch 'main' into doctest-parent

This commit is contained in:
Philipp A 2024-02-12 10:06:18 +01:00 committed by GitHub
commit 5587ecf428
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 390 additions and 204 deletions

View File

@ -1,6 +1,6 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.15" rev: "v0.2.0"
hooks: hooks:
- id: ruff - id: ruff
args: ["--fix"] args: ["--fix"]
@ -21,11 +21,6 @@ repos:
hooks: hooks:
- id: blacken-docs - id: blacken-docs
additional_dependencies: [black==24.1.1] 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 - repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 rev: v1.10.0
hooks: hooks:
@ -47,6 +42,12 @@ repos:
# for mypy running on python>=3.11 since exceptiongroup is only a dependency # for mypy running on python>=3.11 since exceptiongroup is only a dependency
# on <3.11 # on <3.11
- exceptiongroup>=1.0.0rc8 - 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 - repo: local
hooks: hooks:
- id: rst - id: rst

View File

@ -417,6 +417,7 @@ Vivaan Verma
Vlad Dragos Vlad Dragos
Vlad Radziuk Vlad Radziuk
Vladyslav Rachek Vladyslav Rachek
Volodymyr Kochetkov
Volodymyr Piskun Volodymyr Piskun
Wei Lin Wei Lin
Wil Cooley Wil Cooley

View File

@ -5,7 +5,7 @@ if __name__ == "__main__":
import cProfile import cProfile
import pstats import pstats
import pytest # NOQA import pytest # noqa: F401
script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"] script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"]
cProfile.run("pytest.cmdline.main(%r)" % script, "prof") cProfile.run("pytest.cmdline.main(%r)" % script, "prof")

View File

@ -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 <https://github.com/python/cpython/issues/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.

View File

@ -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.

View File

@ -172,7 +172,7 @@ class TestRaises:
raise ValueError("demo error") raise ValueError("demo error")
def test_tupleerror(self): 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): def test_reinterpret_fails_with_print_for_the_fun_of_it(self):
items = [1, 2, 3] items = [1, 2, 3]
@ -180,7 +180,7 @@ class TestRaises:
a, b = items.pop() a, b = items.pop()
def test_some_error(self): def test_some_error(self):
if namenotexi: # NOQA if namenotexi: # noqa: F821
pass pass
def func1(self): def func1(self):

View File

@ -67,7 +67,7 @@ This list contains 1367 plugins.
:pypi:`pytest-allure-intersection` Oct 27, 2022 N/A pytest (<5) :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-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-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-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-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) :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-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-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` 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-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-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 :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-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-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-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-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-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) :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-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-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-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-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` 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 :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-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-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-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-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-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 :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-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-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-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-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-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 :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-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-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-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-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` 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) :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-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-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` 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-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-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-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-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` 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-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) :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-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-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` 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-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-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 :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-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-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-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-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-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 :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-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-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-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-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-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 :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-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-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-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-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-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) :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-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` 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-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-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-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-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-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-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` 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-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-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 :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-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-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` 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-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-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 :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-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-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-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-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-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 :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-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-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` 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-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-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 :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-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` 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-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-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-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 :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-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-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-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-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-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) :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-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-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-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-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-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) :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-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` 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-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-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` 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) :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-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-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-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-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-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 :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-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-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-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-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-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 :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-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-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-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-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-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-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-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-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) :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-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-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-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-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-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 :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-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-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-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-django` Better fixtures for django Feb 05, 2024 5 - Production/Stable 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-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-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-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 :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-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-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-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-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-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 :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-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-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-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-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-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 :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 Static code checks used at Alphamoon
:pypi:`pytest-analyzer` :pypi:`pytest-analyzer`
*last release*: Dec 06, 2023, *last release*: Feb 06, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest >=7.3.1 *requires*: pytest >=7.3.1
@ -1771,7 +1771,7 @@ This list contains 1367 plugins.
A plugin to use approvaltests with pytest A plugin to use approvaltests with pytest
:pypi:`pytest-approvaltests-geo` :pypi:`pytest-approvaltests-geo`
*last release*: Dec 12, 2023, *last release*: Feb 05, 2024,
*status*: 5 - Production/Stable, *status*: 5 - Production/Stable,
*requires*: pytest *requires*: pytest
@ -1904,9 +1904,9 @@ This list contains 1367 plugins.
Pytest fixtures for async generators Pytest fixtures for async generators
:pypi:`pytest-asyncio` :pypi:`pytest-asyncio`
*last release*: Jan 28, 2024, *last release*: Feb 09, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest <8,>=7.0.0 *requires*: pytest <9,>=7.0.0
Pytest support for asyncio 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. A pytest plugin to send a report and printing summary of tests.
:pypi:`pytest-choose` :pypi:`pytest-choose`
*last release*: Dec 26, 2023, *last release*: Feb 04, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest >=7.0.0 *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. Mark tests as testing a deprecated feature with a warning note.
:pypi:`pytest-describe` :pypi:`pytest-describe`
*last release*: Apr 09, 2023, *last release*: Feb 10, 2024,
*status*: 5 - Production/Stable, *status*: 5 - Production/Stable,
*requires*: pytest (<8,>=4.6) *requires*: pytest <9,>=4.6
Describe-style plugin for pytest Describe-style plugin for pytest
@ -4893,7 +4893,7 @@ This list contains 1367 plugins.
:pypi:`pytest-fzf` :pypi:`pytest-fzf`
*last release*: Dec 15, 2023, *last release*: Feb 07, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest >=6.0.0 *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. A plugin to provide different types and configs of Kubernetes clusters that can be used for testing.
:pypi:`pytest-helm-charts` :pypi:`pytest-helm-charts`
*last release*: Sep 13, 2023, *last release*: Feb 07, 2024,
*status*: 4 - Beta, *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. 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. A pytest plugin for use with homeassistant custom components.
:pypi:`pytest-homeassistant-custom-component` :pypi:`pytest-homeassistant-custom-component`
*last release*: Feb 03, 2024, *last release*: Feb 10, 2024,
*status*: 3 - Alpha, *status*: 3 - Alpha,
*requires*: pytest ==7.4.4 *requires*: pytest ==7.4.4
@ -5257,7 +5257,7 @@ This list contains 1367 plugins.
A plugin that tracks test changes A plugin that tracks test changes
:pypi:`pytest-houdini` :pypi:`pytest-houdini`
*last release*: Dec 25, 2023, *last release*: Feb 09, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest *requires*: pytest
@ -5572,7 +5572,7 @@ This list contains 1367 plugins.
A py.test plugin providing fixtures to simplify inmanta modules testing. A py.test plugin providing fixtures to simplify inmanta modules testing.
:pypi:`pytest-inmanta-extensions` :pypi:`pytest-inmanta-extensions`
*last release*: Jan 04, 2024, *last release*: Feb 09, 2024,
*status*: 5 - Production/Stable, *status*: 5 - Production/Stable,
*requires*: N/A *requires*: N/A
@ -5656,7 +5656,7 @@ This list contains 1367 plugins.
Pytest plugin for intercepting outgoing connection requests during pytest run. Pytest plugin for intercepting outgoing connection requests during pytest run.
:pypi:`pytest-interface-tester` :pypi:`pytest-interface-tester`
*last release*: Jan 26, 2024, *last release*: Feb 09, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest *requires*: pytest
@ -5999,7 +5999,7 @@ This list contains 1367 plugins.
It helps to use fixtures in pytest.mark.parametrize It helps to use fixtures in pytest.mark.parametrize
:pypi:`pytest-lazy-fixtures` :pypi:`pytest-lazy-fixtures`
*last release*: Feb 01, 2024, *last release*: Feb 06, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest (>=7) *requires*: pytest (>=7)
@ -6146,7 +6146,7 @@ This list contains 1367 plugins.
Pytest plugin for AWS integration tests Pytest plugin for AWS integration tests
:pypi:`pytest-lock` :pypi:`pytest-lock`
*last release*: Jan 27, 2024, *last release*: Feb 03, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest (>=7.4.3,<8.0.0) *requires*: pytest (>=7.4.3,<8.0.0)
@ -6216,9 +6216,9 @@ This list contains 1367 plugins.
:pypi:`pytest-logikal` :pypi:`pytest-logikal`
*last release*: Jan 27, 2024, *last release*: Feb 05, 2024,
*status*: 5 - Production/Stable, *status*: 5 - Production/Stable,
*requires*: pytest ==7.4.4 *requires*: pytest ==8.0.0
Common testing environment Common testing environment
@ -6244,7 +6244,7 @@ This list contains 1367 plugins.
pytest plugin for looping tests pytest plugin for looping tests
:pypi:`pytest-lsp` :pypi:`pytest-lsp`
*last release*: Nov 13, 2023, *last release*: Feb 07, 2024,
*status*: 3 - Alpha, *status*: 3 - Alpha,
*requires*: pytest *requires*: pytest
@ -6272,9 +6272,9 @@ This list contains 1367 plugins.
Test your markdown docs with pytest Test your markdown docs with pytest
:pypi:`pytest-markdown-docs` :pypi:`pytest-markdown-docs`
*last release*: Mar 09, 2023, *last release*: Feb 07, 2024,
*status*: N/A, *status*: N/A,
*requires*: N/A *requires*: pytest (>=7.0.0)
Run markdown code fences through pytest Run markdown code fences through pytest
@ -6377,9 +6377,9 @@ This list contains 1367 plugins.
Plugin for generating Markdown reports for pytest results Plugin for generating Markdown reports for pytest results
:pypi:`pytest-md-report` :pypi:`pytest-md-report`
*last release*: Oct 08, 2023, *last release*: Feb 04, 2024,
*status*: 4 - Beta, *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. 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 Configure pytest fixtures using a combination of"parametrize" and markers
:pypi:`pytest-parameterize-from-files` :pypi:`pytest-parameterize-from-files`
*last release*: Jan 27, 2024, *last release*: Feb 09, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest>=7.2.0 *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 A pytest wrapper with fixtures for Playwright to automate web browsers
:pypi:`pytest-playwright-async` :pypi:`pytest-playwright-async`
*last release*: Jul 03, 2023, *last release*: Feb 06, 2024,
*status*: N/A, *status*: N/A,
*requires*: N/A *requires*: N/A
@ -7889,7 +7889,7 @@ This list contains 1367 plugins.
Pyramid server fixture for py.test Pyramid server fixture for py.test
:pypi:`pytest-pyreport` :pypi:`pytest-pyreport`
*last release*: Nov 03, 2023, *last release*: Feb 03, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest *requires*: pytest
@ -7987,9 +7987,9 @@ This list contains 1367 plugins.
pytest plugin to generate test result QR codes pytest plugin to generate test result QR codes
:pypi:`pytest-qt` :pypi:`pytest-qt`
*last release*: Dec 22, 2023, *last release*: Feb 07, 2024,
*status*: 5 - Production/Stable, *status*: 5 - Production/Stable,
*requires*: pytest >=3.0.0 *requires*: pytest
pytest support for PyQt and PySide applications 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 pytest plugin for adding tests' parameters to junit report
:pypi:`pytest-reportportal` :pypi:`pytest-reportportal`
*last release*: Dec 06, 2023, *last release*: Feb 05, 2024,
*status*: N/A, *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 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 pytest plugin to re-run tests to eliminate flaky failures
:pypi:`pytest-reserial` :pypi:`pytest-reserial`
*last release*: Aug 31, 2023, *last release*: Feb 08, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest *requires*: pytest
@ -8512,7 +8512,7 @@ This list contains 1367 plugins.
A RethinkDB plugin for pytest. A RethinkDB plugin for pytest.
:pypi:`pytest-retry` :pypi:`pytest-retry`
*last release*: Jan 04, 2024, *last release*: Feb 04, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest >=7.0.0 *requires*: pytest >=7.0.0
@ -9268,9 +9268,9 @@ This list contains 1367 plugins.
Modern benchmarking library for python with pytest integration. Modern benchmarking library for python with pytest integration.
:pypi:`pytest-sphinx` :pypi:`pytest-sphinx`
*last release*: Sep 06, 2022, *last release*: Feb 03, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest (>=7.0.0) *requires*: pytest >=8.0.0
Doctest plugin for pytest with support for Sphinx-specific doctest-directives 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. Run a test suite one failing test at a time.
:pypi:`pytest-stf` :pypi:`pytest-stf`
*last release*: Oct 10, 2023, *last release*: Feb 08, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest >=5.0 *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. A Pytest plugin that allows you to loop tests for a user defined amount of time.
:pypi:`pytest-structlog` :pypi:`pytest-structlog`
*last release*: Dec 18, 2022, *last release*: Feb 04, 2024,
*status*: N/A, *status*: N/A,
*requires*: pytest *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 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` :pypi:`pytest-test-utils`
*last release*: Jul 14, 2022, *last release*: Feb 08, 2024,
*status*: N/A, *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 A pytest plugin to report test results to tinybird
:pypi:`pytest-tipsi-django` :pypi:`pytest-tipsi-django`
*last release*: Nov 17, 2021, *last release*: Feb 05, 2024,
*status*: 4 - Beta, *status*: 5 - Production/Stable,
*requires*: pytest (>=6.0.0) *requires*: pytest>=6.0.0
Better fixtures for django
:pypi:`pytest-tipsi-testing` :pypi:`pytest-tipsi-testing`
*last release*: Nov 04, 2020, *last release*: Feb 04, 2024,
*status*: 4 - Beta, *status*: 5 - Production/Stable,
*requires*: pytest (>=3.3.0) *requires*: pytest>=3.3.0
Better fixtures management. Various helpers Better fixtures management. Various helpers
@ -10521,7 +10521,7 @@ This list contains 1367 plugins.
py.test fixture for creating a virtual environment py.test fixture for creating a virtual environment
:pypi:`pytest-ver` :pypi:`pytest-ver`
*last release*: Dec 19, 2023, *last release*: Feb 07, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: pytest *requires*: pytest
@ -10633,7 +10633,7 @@ This list contains 1367 plugins.
Local continuous test runner with pytest and watchdog. Local continuous test runner with pytest and watchdog.
:pypi:`pytest-watcher` :pypi:`pytest-watcher`
*last release*: Jan 28, 2024, *last release*: Feb 06, 2024,
*status*: 4 - Beta, *status*: 4 - Beta,
*requires*: N/A *requires*: N/A

View File

@ -1,13 +1,178 @@
[build-system] [project]
requires = [ name = "pytest"
"setuptools>=45.0", description = "pytest: simple powerful testing with Python"
"setuptools-scm[toml]>=6.2.3", readme = "README.rst"
keywords = [
"test",
"unittest",
] ]
license = {text = "MIT"}
authors = [
{name = "Holger Krekel"},
{name = "Bruno Oliveira"},
{name = "Ronny Pfannschmidt"},
{name = "Floris Bruynooghe"},
{name = "Brianna Laugher"},
{name = "Florian Bruhin"},
{name = "Others (See AUTHORS)"},
]
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 :: POSIX",
"Operating System :: Unix",
"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",
]
dynamic = [
"version",
]
dependencies = [
'colorama; sys_platform == "win32"',
'exceptiongroup>=1.0.0rc8; python_version < "3.11"',
"iniconfig",
"packaging",
"pluggy<2.0,>=1.4",
'tomli>=1; python_version < "3.11"',
]
[project.optional-dependencies]
testing = [
"argcomplete",
"attrs>=19.2",
"hypothesis>=3.56",
"mock",
"pygments>=2.7.2",
"requests",
"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"
[build-system]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61",
"setuptools-scm[toml]>=6.2.3",
]
[tool.setuptools.package-data]
"_pytest" = ["py.typed"]
"pytest" = ["py.typed"]
[tool.setuptools_scm] [tool.setuptools_scm]
write_to = "src/_pytest/_version.py" write_to = "src/_pytest/_version.py"
[tool.black]
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
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PYI", # flake8-pyi
"UP", # pyupgrade
"RUF", # ruff
"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 = [
# bugbear ignore
"B004", # Using `hasattr(x, "__call__")` to test if x is callable is unreliable.
"B007", # Loop control variable `i` not used within loop body
"B009", # Do not call `getattr` with a constant attribute value
"B010", # [*] Do not call `setattr` with a constant attribute value.
"B011", # Do not `assert False` (`python -O` removes these calls)
"B028", # No explicit `stacklevel` keyword argument found
# pycodestyle ignore
# pytest can do weird low-level things, and we usually know
# what we're doing when we use type(..) is ...
"E721", # Do not compare types, use `isinstance()`
# pydocstyle ignore
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in `__init__`
"D209", # [*] Multi-line docstring closing quotes should be on a separate line
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood
"D402", # First line should not be the function's signature
"D404", # First word of the docstring should not be "This"
"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]
# In order to be able to format for 88 char in ruff format
max-line-length = 120
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.isort]
force-single-line = true
combine-as-imports = true
force-sort-within-sections = true
order-by-type = false
known-local-folder = ["pytest", "_pytest"]
lines-after-imports = 2
[tool.ruff.lint.per-file-ignores]
"src/_pytest/_py/**/*.py" = ["B", "PYI"]
"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] [tool.pytest.ini_options]
minversion = "2.0" minversion = "2.0"
addopts = "-rfEX -p pytester --strict-markers" addopts = "-rfEX -p pytester --strict-markers"
@ -67,7 +232,6 @@ markers = [
"uses_pexpect", "uses_pexpect",
] ]
[tool.towncrier] [tool.towncrier]
package = "pytest" package = "pytest"
package_dir = "src" package_dir = "src"

View File

@ -1,68 +0,0 @@
[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 =
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

View File

@ -452,7 +452,7 @@ class LocalPath:
def ensure_dir(self, *args): def ensure_dir(self, *args):
"""Ensure the path joined with args is a directory.""" """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): def bestrelpath(self, dest):
"""Return a string which is a relative path from self """Return a string which is a relative path from self

View File

@ -1006,7 +1006,7 @@ class AssertionRewriter(ast.NodeVisitor):
if i: if i:
fail_inner: List[ast.stmt] = [] fail_inner: List[ast.stmt] = []
# cond is set in a prior loop iteration below # 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 self.expl_stmts = fail_inner
# Check if the left operand is a ast.NamedExpr and the value has already been visited # Check if the left operand is a ast.NamedExpr and the value has already been visited
if ( if (

View File

@ -289,7 +289,7 @@ def get_user_id() -> int | None:
# mypy follows the version and platform checking expectation of PEP 484: # 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 # 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. # 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. # win32 does not have a getuid() function.
# Emscripten has a return 0 stub. # Emscripten has a return 0 stub.
return None return None

View File

@ -40,7 +40,6 @@ from _pytest.nodes import Item
from _pytest.outcomes import OutcomeException from _pytest.outcomes import OutcomeException
from _pytest.outcomes import skip from _pytest.outcomes import skip
from _pytest.pathlib import fnmatch_ex from _pytest.pathlib import fnmatch_ex
from _pytest.pathlib import import_path
from _pytest.python import Module from _pytest.python import Module
from _pytest.python_api import approx from _pytest.python_api import approx
from _pytest.warning_types import PytestWarning from _pytest.warning_types import PytestWarning
@ -107,7 +106,7 @@ def pytest_addoption(parser: Parser) -> None:
"--doctest-ignore-import-errors", "--doctest-ignore-import-errors",
action="store_true", action="store_true",
default=False, default=False,
help="Ignore doctest ImportErrors", help="Ignore doctest collection errors",
dest="doctest_ignore_import_errors", dest="doctest_ignore_import_errors",
) )
group.addoption( group.addoption(
@ -561,17 +560,17 @@ class DoctestModule(Module):
pass pass
try: try:
module = import_path( module = self.obj
self.path, except Collector.CollectError:
root=self.config.rootpath,
mode=self.config.getoption("importmode"),
)
except ImportError:
if self.config.getvalue("doctest_ignore_import_errors"): if self.config.getvalue("doctest_ignore_import_errors"):
skip("unable to import module %r" % self.path) skip("unable to import module %r" % self.path)
else: else:
raise 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. # Uses internal doctest module parsing mechanism.
finder = MockAwareDocTestFinder() finder = MockAwareDocTestFinder()
optionflags = get_optionflags(self.config) optionflags = get_optionflags(self.config)

View File

@ -1188,7 +1188,7 @@ class FixtureFunctionMarker:
if getattr(function, "_pytestfixturefunction", False): if getattr(function, "_pytestfixturefunction", False):
raise ValueError( 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"): if hasattr(function, "pytestmark"):

View File

@ -624,7 +624,7 @@ class LogXML:
def update_testcase_duration(self, report: TestReport) -> None: def update_testcase_duration(self, report: TestReport) -> None:
"""Accumulate total duration for nodeid from given report and update """Accumulate total duration for nodeid from given report and update
the Junit.testcase with the new total if already created.""" 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 = self.node_reporter(report)
reporter.duration += getattr(report, "duration", 0.0) reporter.duration += getattr(report, "duration", 0.0)

View File

@ -1786,11 +1786,10 @@ class Function(PyobjMixin, nodes.Item):
if len(ntraceback) > 2: if len(ntraceback) > 2:
ntraceback = Traceback( ntraceback = Traceback(
( (
entry ntraceback[0],
if i == 0 or i == len(ntraceback) - 1 *(t.with_repr_style("short") for t in ntraceback[1:-1]),
else entry.with_repr_style("short") ntraceback[-1],
) )
for i, entry in enumerate(ntraceback)
) )
return ntraceback return ntraceback

View File

@ -329,3 +329,14 @@ class WarningsChecker(WarningsRecorder):
module=w.__module__, module=w.__module__,
source=w.source, 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__})"
)

View File

@ -381,7 +381,7 @@ class TerminalReporter:
if self.config.getoption("setupshow", False): if self.config.getoption("setupshow", False):
return False return False
cfg: str = self.config.getini("console_output_style") 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" return "progress"
elif cfg == "count": elif cfg == "count":
return "count" return "count"

View File

@ -1,5 +1,5 @@
anyio[curio,trio]==4.2.0 anyio[curio,trio]==4.2.0
django==5.0 django==5.0.2
pytest-asyncio==0.23.3 pytest-asyncio==0.23.3
# Temporarily not installed until pytest-bdd is fixed: # Temporarily not installed until pytest-bdd is fixed:
# https://github.com/pytest-dev/pytest/pull/11785 # https://github.com/pytest-dev/pytest/pull/11785

View File

@ -712,7 +712,7 @@ class TestRequestBasic:
) )
def test_request_garbage(self, pytester: Pytester) -> None: def test_request_garbage(self, pytester: Pytester) -> None:
try: try:
import xdist # noqa import xdist # noqa: F401
except ImportError: except ImportError:
pass pass
else: else:
@ -4353,6 +4353,27 @@ def test_call_fixture_function_error():
assert fix() == 1 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: def test_fixture_param_shadowing(pytester: Pytester) -> None:
"""Parametrized arguments would be shadowed if a fixture with the same name also exists (#5036)""" """Parametrized arguments would be shadowed if a fixture with the same name also exists (#5036)"""
pytester.makepyfile( pytester.makepyfile(

View File

@ -14,6 +14,9 @@ from typing import Sequence
from typing import Tuple from typing import Tuple
from typing import Union from typing import Union
import hypothesis
from hypothesis import strategies
from _pytest import fixtures from _pytest import fixtures
from _pytest import python from _pytest import python
from _pytest.compat import getfuncargnames from _pytest.compat import getfuncargnames
@ -26,10 +29,6 @@ from _pytest.scope import Scope
import pytest import pytest
# import hypothesis
# from hypothesis import strategies
class TestMetafunc: class TestMetafunc:
def Metafunc(self, func, config=None) -> python.Metafunc: def Metafunc(self, func, config=None) -> python.Metafunc:
# The unit tests of this class check if things work correctly # 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[2].id == "x1-a"
assert metafunc._calls[3].id == "x1-b" assert metafunc._calls[3].id == "x1-b"
# TODO: Uncomment - https://github.com/HypothesisWorks/hypothesis/pull/3849 @hypothesis.given(strategies.text() | strategies.binary())
# @hypothesis.given(strategies.text() | strategies.binary()) @hypothesis.settings(
# @hypothesis.settings( deadline=400.0
# deadline=400.0 ) # very close to std deadline and CI boxes are not reliable in CPU power
# ) # very close to std deadline and CI boxes are not reliable in CPU power def test_idval_hypothesis(self, value) -> None:
# def test_idval_hypothesis(self, value) -> None: escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6)
# escaped = IdMaker([], [], None, None, None, None, None)._idval(value, "a", 6) assert isinstance(escaped, str)
# assert isinstance(escaped, str) escaped.encode("ascii")
# escaped.encode("ascii")
def test_unicode_idval(self) -> None: def test_unicode_idval(self) -> None:
"""Test that Unicode strings outside the ASCII character set get """Test that Unicode strings outside the ASCII character set get

View File

@ -601,7 +601,7 @@ class TestAssert_reprcompare:
def test_list_dont_wrap_strings(self) -> None: def test_list_dont_wrap_strings(self) -> None:
long_a = "a" * 10 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"] l2 = ["should not get wrapped"]
diff = callequal(l1, l2, verbose=True) diff = callequal(l1, l2, verbose=True)
assert diff == [ assert diff == [

View File

@ -200,7 +200,7 @@ class TestAssertionRewrite:
assert getmsg(f2) == "assert False" assert getmsg(f2) == "assert False"
def f3() -> None: 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" assert getmsg(f3, {"a_global": False}) == "assert False"
@ -429,7 +429,7 @@ class TestAssertionRewrite:
def f2() -> None: def f2() -> None:
x = 1 x = 1
assert x == 1 or x == 2 assert x == 1 or x == 2 # noqa: PLR1714
getmsg(f2, must_pass=True) getmsg(f2, must_pass=True)

View File

@ -535,7 +535,7 @@ class TestSession:
newid = item.nodeid newid = item.nodeid
assert newid == id assert newid == id
pprint.pprint(hookrec.calls) pprint.pprint(hookrec.calls)
topdir = pytester.path # noqa topdir = pytester.path # noqa: F841
hookrec.assert_contains( hookrec.assert_contains(
[ [
("pytest_collectstart", "collector.path == topdir"), ("pytest_collectstart", "collector.path == topdir"),

View File

@ -1231,8 +1231,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None:
import myplugin import myplugin
assert myplugin.terminal_plugin == [False, True] assert myplugin.terminal_plugin == [False, True]
""", """,
**{ myplugin="""
"myplugin": """
terminal_plugin = [] terminal_plugin = []
def pytest_configure(config): def pytest_configure(config):
@ -1241,8 +1240,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None:
def pytest_sessionstart(session): def pytest_sessionstart(session):
config = session.config config = session.config
terminal_plugin.append(bool(config.pluginmanager.get_plugin("terminalreporter"))) terminal_plugin.append(bool(config.pluginmanager.get_plugin("terminalreporter")))
""" """,
},
) )
pytester.syspathinsert() pytester.syspathinsert()
result = pytester.runpytest("-p", "myplugin", str(p1)) result = pytester.runpytest("-p", "myplugin", str(p1))

View File

@ -1376,6 +1376,38 @@ class TestDoctestAutoUseFixtures:
str(result.stdout.no_fnmatch_line("*FAILURES*")) str(result.stdout.no_fnmatch_line("*FAILURES*"))
result.stdout.fnmatch_lines(["*=== 1 passed in *"]) 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: class TestDoctestNamespaceFixture:
SCOPES = ["module", "session", "class", "function"] SCOPES = ["module", "session", "class", "function"]

View File

@ -1,4 +1,5 @@
# mypy: allow-untyped-defs # mypy: allow-untyped-defs
import sys
from typing import List from typing import List
from typing import Optional from typing import Optional
from typing import Type from typing import Type
@ -477,3 +478,29 @@ class TestWarns:
with pytest.raises(ValueError, match="some exception"): with pytest.raises(ValueError, match="some exception"):
warnings.warn("some warning", category=FutureWarning) warnings.warn("some warning", category=FutureWarning)
raise ValueError("some exception") 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

View File

@ -74,7 +74,7 @@ class TestEvaluation:
"""@pytest.mark.skipif("not hasattr(os, 'murks')")""", """@pytest.mark.skipif("not hasattr(os, 'murks')")""",
"""@pytest.mark.skipif(condition="hasattr(os, 'murks')")""", """@pytest.mark.skipif(condition="hasattr(os, 'murks')")""",
] ]
for i in range(0, 2): for i in range(2):
item = pytester.getitem( item = pytester.getitem(
f""" f"""
import pytest import pytest

View File

@ -794,7 +794,7 @@ def test_resource_warning(pytester: Pytester, monkeypatch: pytest.MonkeyPatch) -
# available, using `importorskip("tracemalloc")` for example, # available, using `importorskip("tracemalloc")` for example,
# because we want to ensure the same code path does not break in those platforms. # because we want to ensure the same code path does not break in those platforms.
try: try:
import tracemalloc # noqa import tracemalloc # noqa: F401
has_tracemalloc = True has_tracemalloc = True
except ImportError: except ImportError: