Unverified Kaydet (Commit) e1a470bd authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

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.
üst db91e0fe
...@@ -751,11 +751,16 @@ class TestThreadState(unittest.TestCase): ...@@ -751,11 +751,16 @@ class TestThreadState(unittest.TestCase):
class Test_testcapi(unittest.TestCase): class Test_testcapi(unittest.TestCase):
def test__testcapi(self): def test__testcapi(self):
if support.verbose:
print()
for name in dir(_testcapi): for name in dir(_testcapi):
if name.startswith('test_'): if not name.startswith('test_'):
with self.subTest("internal", name=name): continue
test = getattr(_testcapi, name) with self.subTest("internal", name=name):
test() if support.verbose:
print(f" {name}", flush=True)
test = getattr(_testcapi, name)
test()
class PyMemDebugTests(unittest.TestCase): class PyMemDebugTests(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment