From c739a4ef43bcd38fd1217d80c4f545b6c5b23a96 Mon Sep 17 00:00:00 2001 From: "Edgar Y. Walker" Date: Sat, 28 Nov 2026 18:41:09 -0800 Subject: [PATCH] test(hashing): keep wrapped Batch input cold during identity checks --- tests/test_hashing/test_identity_chains.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_hashing/test_identity_chains.py b/tests/test_hashing/test_identity_chains.py index 2545f1cc5..a8bdb0551 100644 --- a/tests/test_hashing/test_identity_chains.py +++ b/tests/test_hashing/test_identity_chains.py @@ -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"):