Handle cache warnings in tests
This commit is contained in:
@@ -40,6 +40,7 @@ class TestNewAPI(object):
|
||||
cache.set("test/broken", [])
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no chmod on windows")
|
||||
@pytest.mark.filterwarnings("ignore:could not create cache path:PytestWarning")
|
||||
def test_cache_writefail_permissions(self, testdir):
|
||||
testdir.makeini("[pytest]")
|
||||
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
||||
@@ -48,6 +49,7 @@ class TestNewAPI(object):
|
||||
cache.set("test/broken", [])
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no chmod on windows")
|
||||
@pytest.mark.filterwarnings("default")
|
||||
def test_cache_failure_warns(self, testdir):
|
||||
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
||||
testdir.makepyfile(
|
||||
|
||||
Reference in New Issue
Block a user