# HG changeset patch # Parent 159ab5b32b4d6b313ecb139433310fcc7f99b09e 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 --- a/Lib/test/test_idle.py +++ b/Lib/test/test_idle.py @@ -23,6 +23,10 @@ # 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.