From 340c56ba503f0000bf684110c2a8c8ade9d5d60b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 9 Dec 2021 12:24:12 -0500 Subject: refactor(test): a context manager to swallow warnings --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/conftest.py') diff --git a/tests/conftest.py b/tests/conftest.py index 16999d96..39f39e25 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -45,6 +45,11 @@ def set_warnings(): message=r".*imp module is deprecated in favour of importlib", ) + warnings.filterwarnings( + "ignore", + category=pytest.PytestRemovedIn8Warning, + ) + if env.PYPY: # pypy3 warns about unclosed files a lot. warnings.filterwarnings("ignore", r".*unclosed file", category=ResourceWarning) -- cgit v1.2.1