mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
test_capi.test__testcapi() becomes more verbose (#4197)
Write the name of each subtest on a new line to help debugging when a test does crash Python.
This commit is contained in:
parent
db91e0fe24
commit
e1a470bd6a
1 changed files with 9 additions and 4 deletions
|
@ -751,11 +751,16 @@ class TestThreadState(unittest.TestCase):
|
|||
|
||||
class Test_testcapi(unittest.TestCase):
|
||||
def test__testcapi(self):
|
||||
if support.verbose:
|
||||
print()
|
||||
for name in dir(_testcapi):
|
||||
if name.startswith('test_'):
|
||||
with self.subTest("internal", name=name):
|
||||
test = getattr(_testcapi, name)
|
||||
test()
|
||||
if not name.startswith('test_'):
|
||||
continue
|
||||
with self.subTest("internal", name=name):
|
||||
if support.verbose:
|
||||
print(f" {name}", flush=True)
|
||||
test = getattr(_testcapi, name)
|
||||
test()
|
||||
|
||||
|
||||
class PyMemDebugTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue