diff --git a/changelog/12647.contrib.rst b/changelog/12647.contrib.rst new file mode 100644 index 00000000000..1d7a3181778 --- /dev/null +++ b/changelog/12647.contrib.rst @@ -0,0 +1 @@ +Fixed running the test suite with the ``hypothesis`` pytest plugin. diff --git a/testing/test_helpconfig.py b/testing/test_helpconfig.py index 7fcf5804ace..dc7e709b65d 100644 --- a/testing/test_helpconfig.py +++ b/testing/test_helpconfig.py @@ -8,6 +8,7 @@ def test_version_verbose(pytester: Pytester, pytestconfig, monkeypatch) -> None: monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD") + monkeypatch.delenv("PYTEST_PLUGINS", raising=False) result = pytester.runpytest("--version", "--version") assert result.ret == 0 result.stdout.fnmatch_lines([f"*pytest*{pytest.__version__}*imported from*"]) @@ -17,6 +18,7 @@ def test_version_verbose(pytester: Pytester, pytestconfig, monkeypatch) -> None: def test_version_less_verbose(pytester: Pytester, pytestconfig, monkeypatch) -> None: monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD") + monkeypatch.delenv("PYTEST_PLUGINS", raising=False) result = pytester.runpytest("--version") assert result.ret == 0 result.stdout.fnmatch_lines([f"pytest {pytest.__version__}"]) diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 14125560d5a..a5ca003185c 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -859,6 +859,7 @@ def test_header_trailer_info( self, monkeypatch: MonkeyPatch, pytester: Pytester, request ) -> None: monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD") + monkeypatch.delenv("PYTEST_PLUGINS", raising=False) pytester.makepyfile( """ def test_passes():