diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2017-10-31 08:40:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-31 08:40:59 -0700 |
| commit | e1a470bd6ae87f9501b8830caa64e7a8df0a2302 (patch) | |
| tree | e3432ecddbcf8bbf1f64f7469f6bbeece8069585 /Lib/test/test_capi.py | |
| parent | db91e0fe2417f075693a194a492b1699829871e7 (diff) | |
| download | cpython-git-e1a470bd6ae87f9501b8830caa64e7a8df0a2302.tar.gz | |
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.
Diffstat (limited to 'Lib/test/test_capi.py')
| -rw-r--r-- | Lib/test/test_capi.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 921735ef5d..bb5b2a3b9f 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -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): |
