]> www.git.momoyon.org Git - lang.git/commitdiff
Update test.py
authormomoyon <ahmedsamyh10@gmail.com>
Sun, 30 Mar 2025 15:51:53 +0000 (20:51 +0500)
committermomoyon <ahmedsamyh10@gmail.com>
Sun, 30 Mar 2025 15:51:53 +0000 (20:51 +0500)
test.py

diff --git a/test.py b/test.py
index ca4588c3207a35f6c2a53db9f48d6f662cc42805..7d7d0ec3dbea5f0a5771ef4c2cfe0026d6101e68 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -251,18 +251,22 @@ def main():
                     if stop_on_error: exit(1)
                     else: continue
                 else:
+                    failed = False
                     if res.stdout != test.build_expected_stdout:
                         print('[FAILED]', file=sys.stderr)
                         print(f"build_Expected: >>>{test.build_expected_stdout}>>>")
                         print(f"But Got: >>>{res.stdout}>>>")
+                        failed = True
                         if stop_on_error: exit(1)
                     if res.stderr != test.build_expected_stderr:
                         print('[FAILED]', file=sys.stderr)
                         print(f"build_Expected: >>>{test.build_expected_stderr}>>>")
                         print(f"But Got: >>>{res.stderr}>>>")
+                        failed = True
                         if stop_on_error: exit(1)
-                    passing_tests_count += 1
-                    print("[PASS] ", end='')
+                    if not failed:
+                        passing_tests_count += 1
+                        print("[PASS] ", end='')
                     o = False
                     if verbose_output and res.stdout:
                         print(f"{res.stdout}")