From f8f62adefeb1f8a2f44faa43cd8171dd9e29ec29 Mon Sep 17 00:00:00 2001 From: Ilya Sovtsov Date: Wed, 14 Oct 2026 10:04:10 +0700 Subject: [PATCH] fix skipped tests --- test/.self-test/test_harness.py | 10 ---------- test/run_tests.py | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/test/.self-test/test_harness.py b/test/.self-test/test_harness.py index a45cb7d0..3d5efc4d 100644 --- a/test/.self-test/test_harness.py +++ b/test/.self-test/test_harness.py @@ -299,16 +299,6 @@ def test_exit_only_exact_code_auto_discover(harness, run): assert "PASS exit5" in out -def test_exit_only_stages_list_skips(harness, run): - """Exit-only test: explicit stages list + exit=0, no golden -> SKIP.""" - harness.add_test("skipme", src="// exit: 0\n", - meta={"stages": ["lexer"], "exit": 0}) - cfg = harness.write_config(stages=lexer_stage(["kind"])) - rc, out = run(["test", "--config", cfg]) - assert rc == 0 - assert "SKIP skipme" in out - - def test_crash_fails(harness, run): add_lexer(harness, "crash", src="// crash\n", meta={"exit": 0}) cfg = harness.write_config(stages=lexer_stage(["kind"])) diff --git a/test/run_tests.py b/test/run_tests.py index 051523f1..7b11fb2a 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -377,7 +377,7 @@ def discover_tests(test_root, grammar, stage_filter, name_filter, skip_dir=None, spec = False for stage in STAGE_GOLDEN_DEFAULT: s = exit_spec(meta, stage=stage) - if s == "nonzero" or (isinstance(s, int) and s != 0): + if s == "nonzero" or isinstance(s, int): spec = s break if spec: @@ -728,7 +728,7 @@ def no_golden_result(result, meta, is_fuzz, stage=None): if is_fuzz: return result # fuzz exit contract met; nothing to compare spec = exit_spec(meta, stage=stage) - if spec == "nonzero" or (isinstance(spec, int) and spec != 0): + if spec == "nonzero" or isinstance(spec, int): return result # exit-only negative test result.status = "SKIP" result.lines.append("no golden file; nothing to compare") @@ -1123,7 +1123,7 @@ def Y(s): if not found_stages: for stage in STAGE_GOLDEN_DEFAULT: s = exit_spec(meta, stage=stage) - if s == "nonzero" or (isinstance(s, int) and s != 0): + if s == "nonzero" or isinstance(s, int): found_stages.add(stage) break if not found_stages: