test_cache_writefail_permissions: ignore any other plugins

This commit is contained in:
Daniel Hahler 2019-11-15 23:43:54 +01:00
parent 1b4623a6d1
commit b9a3ba1fe8
1 changed files with 2 additions and 1 deletions

View File

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