From c5f73018287ce0ccc9b03487f44f5797684ca166 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 18 Nov 2020 17:56:33 +0100 Subject: [PATCH] tests: fix test_cache_writefail_uses_warnings for pypy3 --- testing/test_cacheprovider.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index 7b49835d969..eedd01df05b 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -33,6 +33,7 @@ def test_config_cache_dataerror(self, testdir): assert val == -2 @pytest.mark.filterwarnings("default") + @pytest.mark.pypy_specific def test_cache_writefail_uses_warnings(self, testdir): testdir.makeini("[pytest]") cache_file_instead_of_dir = testdir.tmpdir.join(".pytest_cache") @@ -62,7 +63,7 @@ def test_cache_writefail_uses_warnings(self, testdir): assert len(wr) == 1 assert wr[0].filename == __file__ assert re.match( - r"^could not write cache path .*broken: .*broken'$", + r"^could not write cache path .*broken: .*broken'\)?$", str(wr[0].message), )