mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
Issue #19440: Clean up test_capi
This commit is contained in:
parent
0eac43a4eb
commit
c12f09ed24
2 changed files with 11 additions and 13 deletions
|
@ -1,7 +1,6 @@
|
||||||
# Run the _testcapi module tests (tests for the Python/C API): by defn,
|
# Run the _testcapi module tests (tests for the Python/C API): by defn,
|
||||||
# these are all functions _testcapi exports whose name begins with 'test_'.
|
# these are all functions _testcapi exports whose name begins with 'test_'.
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
import random
|
import random
|
||||||
|
@ -351,17 +350,12 @@ class TestThreadState(unittest.TestCase):
|
||||||
t.start()
|
t.start()
|
||||||
t.join()
|
t.join()
|
||||||
|
|
||||||
|
class Test_testcapi(unittest.TestCase):
|
||||||
def test_main():
|
def test__testcapi(self):
|
||||||
support.run_unittest(CAPITest, TestPendingCalls, Test6012,
|
for name in dir(_testcapi):
|
||||||
EmbeddingTest, SkipitemTest, TestThreadState)
|
if name.startswith('test_'):
|
||||||
|
test = getattr(_testcapi, name)
|
||||||
for name in dir(_testcapi):
|
test()
|
||||||
if name.startswith('test_'):
|
|
||||||
test = getattr(_testcapi, name)
|
|
||||||
if support.verbose:
|
|
||||||
print("internal", name)
|
|
||||||
test()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test_main()
|
unittest.main()
|
||||||
|
|
|
@ -42,6 +42,10 @@ Library
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #19440: Clean up test_capi by removing an unnecessary __future__
|
||||||
|
import, converting from test_main to unittest.main, and running the
|
||||||
|
_testcapi module tests within a unittest TestCase.
|
||||||
|
|
||||||
- Issue #18702: All skipped tests now reported as skipped.
|
- Issue #18702: All skipped tests now reported as skipped.
|
||||||
|
|
||||||
- Issue #19085: Added basic tests for all tkinter widget options.
|
- Issue #19085: Added basic tests for all tkinter widget options.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue