]> granicus.if.org Git - python/commitdiff
Issue #XXXXX: Fix test_idle so that idlelib test cases are actually run
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 4 Nov 2013 04:37:54 +0000 (23:37 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Mon, 4 Nov 2013 04:37:54 +0000 (23:37 -0500)
under test.regrtest on 2.7.

Lib/test/test_idle.py

index 8552e6fbe4420d3939562d147cce51fa5ecb03d3..07f45c6999ceb760d55f045ee0ef1f3dd03d4f6c 100644 (file)
@@ -23,6 +23,10 @@ if use_resources and 'gui' in use_resources:
 # load_tests() if it finds it. (Unittest.main does the same.)
 load_tests = idletest.load_tests
 
+# pre-3.3 regrtest does not support the load_tests protocol. use test_main
+def test_main():
+    support.run_unittest(unittest.TestLoader().loadTestsFromModule(idletest))
+
 if __name__ == '__main__':
     # Until unittest supports resources, we emulate regrtest's -ugui
     # so loaded tests run the same as if textually present here.