(original) (raw)

changeset: 86908:cced7981ec4d branch: 2.7 user: Terry Jan Reedy tjreedy@udel.edu date: Sun Nov 03 23:37:54 2013 -0500 files: Lib/test/test_idle.py description: Issue #XXXXX: Fix test_idle so that idlelib test cases are actually run under test.regrtest on 2.7. diff -r 358496e67a89 -r cced7981ec4d Lib/test/test_idle.py --- a/Lib/test/test_idle.py Sun Nov 03 22:27:04 2013 -0600 +++ b/Lib/test/test_idle.py Sun Nov 03 23:37:54 2013 -0500 @@ -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. /tjreedy@udel.edu