def test_read_partitioned_table_protocol(): table_path = "../rust/tests/data/delta-0.8.0-partitioned" dt = DeltaTable(table_path) protocol = dt.protocol() assert protocol.min_reader_version == 1 assert protocol.min_writer_version == 2
def test_writer_fails_on_protocol(existing_table: DeltaTable, sample_data: pa.Table): existing_table.protocol = Mock(return_value=ProtocolVersions(1, 2)) with pytest.raises(DeltaTableProtocolError): write_deltalake(existing_table, sample_data, mode="overwrite")