From f1cfd10c94f0d62f868ed00a7406c9fe91426173 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 4 Sep 2018 14:44:02 -0300 Subject: [PATCH] Handle cache warnings in tests --- testing/test_cacheprovider.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index c9d174229..1048994d3 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -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(