Skip to content

Commit 34d67a2

Browse files
committed
test(native): filter semantic deferrals without branching in the CLI test helper
1 parent 94da821 commit 34d67a2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • tests/e2e/src/sqlbuild/cli/commands/main/compile/semantic_checks

‎tests/e2e/src/sqlbuild/cli/commands/main/compile/semantic_checks/helpers.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ def engine_semantic_run(
6060
for path in sorted(record_dir.glob("analysis-deferrals-*.jsonl")):
6161
for line in path.read_text("utf-8").splitlines():
6262
record: dict[str, str] = json.loads(line)
63-
if record["site"] in SEMANTIC_DEFERRAL_SITES:
64-
deferrals.append((record["kind"], record["site"]))
63+
deferrals.append((record["kind"], record["site"]))
6564
return EngineSemanticRun(
6665
report=report,
6766
returncode=compiled.returncode,
6867
semantic_wheel_calls=sum(calls[site] for site in SEMANTIC_WHEEL_SITES),
69-
deferrals=tuple(deferrals),
68+
deferrals=tuple(filter(lambda deferral: deferral[1] in SEMANTIC_DEFERRAL_SITES, deferrals)),
7069
)
7170

7271

0 commit comments

Comments
 (0)