Skip to content

Commit a2e0cfe

Browse files
committed
test: assert current_snapshot is not None for mypy narrowing
Signed-off-by: Mansi Dhruv <mansi.p.dhruv@gmail.com>
1 parent 5ec21bd commit a2e0cfe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/table/test_expire_snapshots.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ def test_expire_snapshots_concurrent_rollback_fails(tmp_path_factory: pytest.Tem
365365
cat.create_namespace("ns")
366366
t = cat.create_table("ns.t", schema=pa.schema([("x", pa.int64())]))
367367
t.append(pa.table({"x": [1]}))
368-
s1 = t.current_snapshot().snapshot_id
368+
current_snapshot = t.current_snapshot()
369+
assert current_snapshot is not None
370+
s1 = current_snapshot.snapshot_id
369371
t.append(pa.table({"x": [2]}))
370372

371373
cat.load_table("ns.t").manage_snapshots().rollback_to_snapshot(s1).commit()

0 commit comments

Comments
 (0)