diff -r 1feeeb8992f8 Lib/test/test_capi.py --- a/Lib/test/test_capi.py Sun Nov 03 21:31:18 2013 +0200 +++ b/Lib/test/test_capi.py Sun Nov 03 21:30:31 2013 -0600 @@ -1,7 +1,6 @@ # Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. -from __future__ import with_statement import os import pickle import random @@ -351,17 +350,12 @@ t.start() t.join() - -def test_main(): - support.run_unittest(CAPITest, TestPendingCalls, Test6012, - EmbeddingTest, SkipitemTest, TestThreadState) - - for name in dir(_testcapi): - if name.startswith('test_'): - test = getattr(_testcapi, name) - if support.verbose: - print("internal", name) - test() +class Test_testcapi(unittest.TestCase): + def test__testcapi(self): + for name in dir(_testcapi): + if name.startswith('test_'): + test = getattr(_testcapi, name) + test() if __name__ == "__main__": - test_main() + unittest.main()