improve api tests and error output

show only relevant aptly logs if a test fails.
for async tasks, show task output, as it contains the error message.
This commit is contained in:
André Roth
2024-07-16 19:48:04 +02:00
parent 8029305d32
commit 440c3debdc
11 changed files with 278 additions and 175 deletions

View File

@@ -153,10 +153,8 @@ def run(include_long_tests=False, capture_results=False, tests=None, filters=Non
for (test, t, typ, val, tb, testModule) in fails:
doc = t.__doc__ or ''
print("%s:%s %s" % (test, t.__class__.__name__,
testModule.__name__ + ": " + doc.strip()))
traceback.print_exception(typ, val, tb)
print("=" * 60)
print(" - %s:%s %s" % (test, t.__class__.__name__,
testModule.__name__ + ": " + doc.strip()))
sys.exit(1)