Skip to content

Commit d4eaa1b

Browse files
Merge pull request #1110 from vojtechtrefny/master_tests-skip-print-fix
tests: Fix printing skipped test cases without docstring
2 parents ae6e249 + 73853a7 commit d4eaa1b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/run_tests.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,13 @@ def _parse_skip_config(config):
342342
if skip_id:
343343
test_name, test_module = _split_test_id(test_id)
344344
reason = "not supported on this distribution in this version and arch: %s" % skipping[skip_id]
345-
print("%s (%s)\n%s ... skipped '%s'" % (test_name, test_module,
346-
test._testMethodDoc, reason),
347-
file=sys.stderr)
345+
if test._testMethodDoc:
346+
print("%s (%s)\n%s ... skipped '%s'" % (test_name, test_module,
347+
test._testMethodDoc, reason),
348+
file=sys.stderr)
349+
else:
350+
print("%s (%s) ... skipped '%s'" % (test_name, test_module, reason),
351+
file=sys.stderr)
348352
continue
349353

350354
# finally add the test to the suite

0 commit comments

Comments
 (0)