diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index 2d91e234b..0e1194b02 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -59,7 +59,8 @@ class TestNewAPI: @pytest.mark.filterwarnings( "ignore:could not create cache path:pytest.PytestWarning" ) - def test_cache_failure_warns(self, testdir): + def test_cache_failure_warns(self, testdir, monkeypatch): + monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1") cache_dir = str(testdir.tmpdir.ensure_dir(".pytest_cache")) mode = os.stat(cache_dir)[stat.ST_MODE] testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)