diff options
author | David Robillard <d@drobilla.net> | 2023-03-28 12:12:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-05 09:45:15 -0400 |
commit | 4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706 (patch) | |
tree | 89ece7e437e820a01560522f738f8ee9a8070afb /test/serd_test_util | |
parent | d25435678a9ced05bd3a8c78ae3534c230fdfc5d (diff) | |
download | serd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.tar.gz serd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.tar.bz2 serd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.zip |
Clean up Python scripts and add a formatting test
Diffstat (limited to 'test/serd_test_util')
-rw-r--r-- | test/serd_test_util/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/serd_test_util/__init__.py b/test/serd_test_util/__init__.py index 7482762d..8027462b 100644 --- a/test/serd_test_util/__init__.py +++ b/test/serd_test_util/__init__.py @@ -5,6 +5,9 @@ """Utilities for data-driven tests.""" +# pylint: disable=consider-using-f-string +# pylint: disable=invalid-name + import datetime import difflib import os @@ -45,20 +48,21 @@ def error(message): sys.stderr.write("error: ") sys.stderr.write(message) + sys.stderr.write("\n") def print_result_summary(results): """Print test result summary to stdout or stderr as appropriate.""" if results.n_tests <= 0: - error("No tests found\n") + error("No tests found") return -1 failed, total = (results.n_failures, results.n_tests) if failed == 0: sys.stdout.write("All {} tests passed\n".format(total)) else: - error("{}/{} tests failed\n".format(failed, total)) + error("{}/{} tests failed".format(failed, total)) return failed |