[Python-checkins] r80554 - python/trunk/Lib/test/test_doctest.py
victor.stinner
python-checkins at python.org
Tue Apr 27 23:51:26 CEST 2010
Author: victor.stinner
Date: Tue Apr 27 23:51:26 2010
New Revision: 80554
Log:
Issue #7449 part 3, test_doctest: import trace module in test_coverage()
Import trace module fail if the threading module is missing. test_coverage() is
only used if test_doctest.py is used with the -c option. This commit allows to
execute the test suite without thread support.
Move "import trace" in test_coverage() and use
test_support.import_module('trace').
Modified:
python/trunk/Lib/test/test_doctest.py
Modified: python/trunk/Lib/test/test_doctest.py
==============================================================================
--- python/trunk/Lib/test/test_doctest.py (original)
+++ python/trunk/Lib/test/test_doctest.py Tue Apr 27 23:51:26 2010
@@ -2468,8 +2468,9 @@
# Check the doctest cases defined here:
test_support.run_doctest(test_doctest, verbosity=True)
-import trace, sys
+import sys
def test_coverage(coverdir):
+ trace = test_support.import_module('trace')
tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,],
trace=0, count=1)
tracer.run('reload(doctest); test_main()')
More information about the Python-checkins
mailing list