Handle cache warnings in tests
This commit is contained in:
parent
d3f72ca202
commit
f1cfd10c94
|
@ -40,6 +40,7 @@ class TestNewAPI(object):
|
||||||
cache.set("test/broken", [])
|
cache.set("test/broken", [])
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no chmod on windows")
|
@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):
|
def test_cache_writefail_permissions(self, testdir):
|
||||||
testdir.makeini("[pytest]")
|
testdir.makeini("[pytest]")
|
||||||
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
||||||
|
@ -48,6 +49,7 @@ class TestNewAPI(object):
|
||||||
cache.set("test/broken", [])
|
cache.set("test/broken", [])
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no chmod on windows")
|
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no chmod on windows")
|
||||||
|
@pytest.mark.filterwarnings("default")
|
||||||
def test_cache_failure_warns(self, testdir):
|
def test_cache_failure_warns(self, testdir):
|
||||||
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
testdir.tmpdir.ensure_dir(".pytest_cache").chmod(0)
|
||||||
testdir.makepyfile(
|
testdir.makepyfile(
|
||||||
|
|
Loading…
Reference in New Issue