summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-11-12 04:47:04 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-11-12 04:47:04 (GMT)
commitc12f09ed24db31f0fc0b58010cb3da9e3107e06c (patch)
tree0a4dc7f31b1076f59467aac9e0354e252ba677cb /Lib/test
parent0eac43a4eb723954cf50829fa31536cd35d1f60b (diff)
downloadcpython-c12f09ed24db31f0fc0b58010cb3da9e3107e06c.zip
cpython-c12f09ed24db31f0fc0b58010cb3da9e3107e06c.tar.gz
cpython-c12f09ed24db31f0fc0b58010cb3da9e3107e06c.tar.bz2
Issue #19440: Clean up test_capi
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_capi.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index f1ea5a9..9013a7b 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -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 @@ class TestThreadState(unittest.TestCase):
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()