From: Terry Jan Reedy Date: Mon, 4 Nov 2013 04:37:54 +0000 (-0500) Subject: Issue #XXXXX: Fix test_idle so that idlelib test cases are actually run X-Git-Tag: v2.7.8~297 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1ea8933343d786c6e3af0613b70c1917a94cb84;p=python Issue #XXXXX: Fix test_idle so that idlelib test cases are actually run under test.regrtest on 2.7. --- diff --git a/Lib/test/test_idle.py b/Lib/test/test_idle.py index 8552e6fbe4..07f45c6999 100644 --- a/Lib/test/test_idle.py +++ b/Lib/test/test_idle.py @@ -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.