summaryrefslogtreecommitdiff
path: root/tests/test_oddball.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r--tests/test_oddball.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 2d0ae7f1..27f2db4d 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -15,6 +15,7 @@ from coverage.files import abs_file
from coverage.misc import import_local_file
from tests.coveragetest import CoverageTest
+from tests.helpers import swallow_warnings
from tests import osinfo
@@ -81,7 +82,7 @@ class RecursionTest(CoverageTest):
def test_long_recursion(self):
# We can't finish a very deep recursion, but we don't crash.
with pytest.raises(RuntimeError):
- with pytest.warns(None):
+ with swallow_warnings("Trace function changed, measurement is likely wrong: None"):
self.check_coverage("""\
def recur(n):
if n == 0:
@@ -118,7 +119,7 @@ class RecursionTest(CoverageTest):
""")
cov = coverage.Coverage()
- with pytest.warns(None):
+ with swallow_warnings("Trace function changed, measurement is likely wrong: None"):
self.start_import_stop(cov, "recur")
pytrace = (cov._collector.tracer_name() == "PyTracer")