Skip to content

Commit 4668e68

Browse files
committed
Fix tests
1 parent 4c3f22d commit 4668e68

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/integration/test_writes/test_writes.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,15 +1849,21 @@ def test_avro_compression_codecs(session_catalog: Catalog, arrow_table_with_null
18491849
identifier = "default.test_avro_compression_codecs"
18501850
tbl = _create_table(session_catalog, identifier, schema=arrow_table_with_null.schema, data=[arrow_table_with_null])
18511851

1852-
with tbl.io.new_input(tbl.current_snapshot().manifest_list).open() as f:
1852+
current_snapshot = tbl.current_snapshot()
1853+
assert current_snapshot is not None
1854+
1855+
with tbl.io.new_input(current_snapshot.manifest_list).open() as f:
18531856
reader = fastavro.reader(f)
18541857
assert reader.codec == "deflate"
18551858

18561859
with tbl.transaction() as tx:
1857-
tx.set_properties(**{TableProperties.WRITE_AVRO_COMPRESSION: "null"})
1860+
tx.set_properties(**{TableProperties.WRITE_AVRO_COMPRESSION: "null"}) # type: ignore
18581861

18591862
tbl.append(arrow_table_with_null)
18601863

1861-
with tbl.io.new_input(tbl.current_snapshot().manifest_list).open() as f:
1864+
current_snapshot = tbl.current_snapshot()
1865+
assert current_snapshot is not None
1866+
1867+
with tbl.io.new_input(current_snapshot.manifest_list).open() as f:
18621868
reader = fastavro.reader(f)
18631869
assert reader.codec == "null"

0 commit comments

Comments
 (0)