From a53ce0ad1ffd3fc1bebfd15729fa44cae8aa8414 Mon Sep 17 00:00:00 2001 From: Joshua Oreman Date: Mon, 8 Jun 2020 06:28:30 +0000 Subject: [PATCH] Ignore ResourceWarnings in test_deprecate --- trio/tests/test_deprecate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trio/tests/test_deprecate.py b/trio/tests/test_deprecate.py index a11e9b8d1f..421278f0d3 100644 --- a/trio/tests/test_deprecate.py +++ b/trio/tests/test_deprecate.py @@ -16,6 +16,9 @@ @pytest.fixture def recwarn_always(recwarn): warnings.simplefilter("always") + # ResourceWarnings about unclosed sockets can occur nondeterministically + # (during GC) which throws off the tests in this file + warnings.simplefilter("ignore", ResourceWarning) return recwarn