Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RECORDER ?= 1
EVIDENCE_BASE ?= origin/main
# The DuckShop benchmarks and the SQLBuild release that compiles them, pinned together as in CI.
SQLBUILD_REF ?= a7bc60e0abee5bb19d67e5bdc948e048a1df82e0
SQLBUILD_VERSION ?= 0.187.2
SQLBUILD_VERSION ?= 0.231.0
DUCKSHOP_DIR ?= target/duckshop
# Compiled DuckShop projects the exact parser check reads; `make duckshop-compiled` builds them.
DUCKSHOP_COMPILED ?= $(DUCKSHOP_DIR)/sqlbuild/benchmarks/duckshop/project/target/compiled $(DUCKSHOP_DIR)/duckshop-10k/target/compiled
Expand Down
19 changes: 14 additions & 5 deletions tests/unit/scripts/grammar_obligations/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
run_database_setups,
settled_cases,
)
from scripts.grammar_obligations.constants import CASE_CAPTURE_RUN_DATABASE
from scripts.grammar_obligations.models import ReceiptView
from scripts.grammar_obligations._helpers.obligations import family_obligations
from scripts.grammar_obligations.constants import (
CASE_CAPTURE_RUN_DATABASE,
KIND_INTERACTION_ALL,
KIND_OPTION_PRESENT,
)
from scripts.grammar_obligations.models import Draft, ReceiptView
from scripts.grammar_obligations.types import Row
from tests.unit.scripts.grammar_obligations._test_types import (
DisprovedExpectationTestCase,
Expand Down Expand Up @@ -459,8 +464,12 @@ def test_given_a_refused_case_with_every_option_when_building_cases_then_each_op
for case in cases:
by_obligation |= dict.fromkeys(case["obligations"], str(case["sql"]))
all_options: Row = {case["sql"]: case for case in cases}[ALL_OPTIONS_SQL]
numbered: list[tuple[str, Draft]] = family_obligations(root=tmp_path, family="ddl")[0]
by_kind: dict[str, list[str]] = {}
for found, draft in numbered:
by_kind.setdefault(draft.kind, []).append(found)
assert (
by_obligation["sf.ddl.alter-widget.set.o005"],
by_obligation["sf.ddl.alter-widget.set.o010"],
"sf.ddl.alter-widget.set.o016" in all_options["obligations"],
by_obligation[by_kind[KIND_OPTION_PRESENT][0]],
by_obligation[by_kind[KIND_OPTION_PRESENT][1]],
by_kind[KIND_INTERACTION_ALL][0] in all_options["obligations"],
) == (*test_case.expected_option_sql, True), test_case.description
Loading