Skip to content

Commit dff51d1

Browse files
committed
Keep Dolt validation propagation test independent of SQL extras
1 parent 6b95895 commit dff51d1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎tests/test_dolt_conformance.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,27 @@ def test_validate_wide_dataset_propagates_explicit_source(
162162
) -> None:
163163
sentinel = object()
164164
calls: list[object] = []
165+
profile_calls: list[object] = []
166+
167+
def capture_effective_profile(
168+
_database_url: str, *, dolt_conformance_source: object,
169+
) -> tuple[object, dict[str, object]]:
170+
profile_calls.append(dolt_conformance_source)
171+
return object(), {}
165172

166173
def stop_after_read_preflight(**kwargs: object) -> tuple[object, object, object]:
167174
calls.append(kwargs["dolt_conformance_source"])
168175
raise UnsupportedOperationError("stop after propagation check")
169176

177+
monkeypatch.setattr(wide, "effective_profile", capture_effective_profile)
170178
monkeypatch.setattr(wide, "read_wide_dataset", stop_after_read_preflight)
171179
with pytest.raises(UnsupportedOperationError, match="propagation check"):
172180
wide.validate_wide_dataset(
173181
database_url="mysql+pymysql://example.invalid/catalog",
174182
dataset_id="synthetic",
175183
dolt_conformance_source=sentinel,
176184
)
185+
assert profile_calls == [sentinel]
177186
assert calls == [sentinel]
178187

179188

0 commit comments

Comments
 (0)