Skip to content

Commit 0356132

Browse files
committed
Improve log messages.
1 parent 13fbc3f commit 0356132

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TEST_PassFunction(Exception):
2020
@atexit.register
2121
def TEST_RunAllTests() -> None:
2222
if not functions: return
23+
print("\33[32m", f"Initializing tests... (Version: {sdl3.__version__}, System: {sdl3.SDL_SYSTEM}, Arch: {sdl3.SDL_ARCH})", "\33[0m", sep = "", flush = True)
2324
passed, failed = 0, 0
2425

2526
for func, systems in functions.items():
@@ -37,5 +38,5 @@ def TEST_RunAllTests() -> None:
3738
print("\33[31m", f"Test '{func.__name__}' failed: {error}", "\33[0m", sep = "", flush = True)
3839
failed += 1
3940

40-
print("\33[35m", f"{passed} test(s) passed, {failed} test(s) failed.", "\33[0m", sep = "", flush = True)
41+
print("\33[31m" if failed else "\33[32m", f"{'Failed' if failed else 'Passed'}! {passed} test(s) passed, {failed} test(s) failed.", "\33[0m", sep = "", flush = True)
4142
if failed: os._exit(-1)

0 commit comments

Comments
 (0)