Skip to content

Commit 3f7c03b

Browse files
committed
Reuse python_version() in display_title()
1 parent b4a0a0b commit 3f7c03b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_pythoncapi_compat.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def display_title(title):
5454
if not VERBOSE:
5555
return
5656

57-
ver = sys.version_info
58-
title = "Python %s.%s: %s" % (ver.major, ver.minor, title)
59-
57+
title = "%s: %s" % (python_version(), title)
6058
print(title)
6159
print("=" * len(title))
6260
print()
@@ -151,6 +149,9 @@ def python_version():
151149

152150

153151
def run_tests(module_name, lang):
152+
if VERBOSE:
153+
print("")
154+
154155
title = "Test %s (%s)" % (module_name, lang)
155156
display_title(title)
156157

0 commit comments

Comments
 (0)