summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-01-30 08:43:35 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-01-30 12:42:38 -0500
commitd35e8c4624bd074c4e55a8e8a33c343f734299db (patch)
tree06e5a177ae67d09b4e7c78dd9018040d67212330 /tests
parentea71ae9a65b14e20c982c818e3c10e50af9ae677 (diff)
downloadpython-coveragepy-git-d35e8c4624bd074c4e55a8e8a33c343f734299db.tar.gz
debug: better tracing of pytracer changed
Diffstat (limited to 'tests')
-rw-r--r--tests/test_oddball.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 2d0ae7f1..e2c17517 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -4,6 +4,7 @@
"""Oddball cases for testing coverage.py"""
import os.path
+import re
import sys
from flaky import flaky
@@ -132,7 +133,13 @@ class RecursionTest(CoverageTest):
# Get a warning about the stackoverflow effect on the tracing function.
if pytrace: # pragma: no metacov
- assert cov._warnings == ["Trace function changed, measurement is likely wrong: None"]
+ assert len(cov._warnings) == 1
+ assert re.fullmatch(
+ r"Trace function changed, data is likely wrong: None != " +
+ r"<bound method PyTracer._trace of " +
+ "<PyTracer at 0x[0-9a-fA-F]+: 5 lines in 1 files>>",
+ cov._warnings[0],
+ )
else:
assert not cov._warnings