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
|
@ -751,9 +751,14 @@ 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_'):
|
||||
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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue