Skip to content
Merged
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
5 changes: 3 additions & 2 deletions tests/test_hashing/test_identity_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,15 @@ def test_wrapped_batch_identity_does_not_build_rows(

source = _source("wrapped", False)
wrapped = rows_on_read(source, source)
result = Batch(2)(wrapped)
assert isinstance(result, StreamProtocol)

def unexpected_build(*args: object, **kwargs: object) -> None:
pytest.fail("identity must not rebuild rows")

with monkeypatch.context() as guard:
guard.setattr(StaticOutputOperatorPod, "_rows_to_table", unexpected_build)
# On Python 3.11, a runtime StreamProtocol check evaluates properties
# such as arrow_types_declared and can materialize the lazy upstream.
result = Batch(2)(wrapped)
assert wrapped.node_hash() == source.node_hash()
for accessor in (result.node_hash, result._chain_content_hash):
with pytest.raises(ValueError, match="undefined.*materializing rows"):
Expand Down
Loading