Skip to content

Commit 0a5c916

Browse files
committed
Move the empty partition name case to its own test
1 parent 475b9d0 commit 0a5c916

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/table/test_init.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,8 +1532,10 @@ def test_update_spec_rejects_duplicate_partition_name(table_v2: Table) -> None:
15321532
with pytest.raises(ValueError, match="Partition name has to be unique: z_bucket"):
15331533
txn.update_spec().rename_field("y_bucket", "z_bucket").add_field("z", BucketTransform(16), "z_bucket").commit()
15341534

1535+
1536+
def test_update_spec_rejects_empty_partition_name(table_v2: Table) -> None:
15351537
with pytest.raises(ValueError, match="Undefined name"):
1536-
txn.update_spec().add_field("z", BucketTransform(16), "").commit()
1538+
table_v2.transaction().update_spec().add_field("z", BucketTransform(16), "").commit()
15371539

15381540

15391541
@pytest.mark.parametrize("table", [lf("table_v2"), lf("table_v3")])

0 commit comments

Comments
 (0)