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"):