summaryrefslogtreecommitdiff
path: root/Lib/test/test_richcmp.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-21 19:29:56 +0000
committerBrett Cannon <bcannon@gmail.com>2011-02-21 19:29:56 +0000
commit31f5929c1e28adcaa1fdb302da366f3c7a92a98a (patch)
tree5035df0c8c20111fb27a4940e38401f244bc9854 /Lib/test/test_richcmp.py
parent4709ec0686ba85466a293b85a243979882696240 (diff)
downloadcpython-git-31f5929c1e28adcaa1fdb302da366f3c7a92a98a.tar.gz
Issue #10990: Prevent tests from clobbering a set trace function.
Many tests simply didn't care if they unset a pre-existing trace function. This made test coverage impossible. This patch fixes various tests to put back any pre-existing trace function. It also introduces test.support.no_tracing as a decorator which will temporarily unset the trace function for tests which simply fail otherwise. Thanks to Kristian Vlaardingerbroek for helping to find the cause of various trace function unsets.
Diffstat (limited to 'Lib/test/test_richcmp.py')
-rw-r--r--Lib/test/test_richcmp.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py
index f8f3717b64..0b629dc5bc 100644
--- a/Lib/test/test_richcmp.py
+++ b/Lib/test/test_richcmp.py
@@ -220,6 +220,7 @@ class MiscTest(unittest.TestCase):
for func in (do, operator.not_):
self.assertRaises(Exc, func, Bad())
+ @support.no_tracing
def test_recursion(self):
# Check that comparison for recursive objects fails gracefully
from collections import UserList