]> granicus.if.org Git - python/commit
Issue #10990: Prevent tests from clobbering a set trace function.
authorBrett Cannon <bcannon@gmail.com>
Mon, 21 Feb 2011 19:29:56 +0000 (19:29 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 21 Feb 2011 19:29:56 +0000 (19:29 +0000)
commit31f5929c1e28adcaa1fdb302da366f3c7a92a98a
tree5035df0c8c20111fb27a4940e38401f244bc9854
parent4709ec0686ba85466a293b85a243979882696240
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.
15 files changed:
Lib/doctest.py
Lib/test/pickletester.py
Lib/test/regrtest.py
Lib/test/support.py
Lib/test/test_doctest.py
Lib/test/test_exceptions.py
Lib/test/test_io.py
Lib/test/test_pdb.py
Lib/test/test_richcmp.py
Lib/test/test_runpy.py
Lib/test/test_scope.py
Lib/test/test_sys_settrace.py
Lib/test/test_trace.py
Lib/test/test_zipimport_support.py
Misc/NEWS