Skip to content

Commit

Permalink
[python] Fix bad merge of #3236 (#3241)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl authored Oct 25, 2024
1 parent a4f4a1b commit d7e6ff8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apis/python/tests/test_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,21 +315,23 @@ def test_dataframe_basics(tmp_path, soma_joinid_domain, index_column_names):
# Test resize down
new_shape = 0
with tiledbsoma.DataFrame.open(uri, "w") as sdf:
ok, msg = sdf.resize_soma_joinid_shape(new_shape, check_only=True)
ok, msg = sdf.tiledbsoma_resize_soma_joinid_shape(
new_shape, check_only=True
)
if has_soma_joinid_dim:
# TODO: check draft spec
# with pytest.raises(ValueError):
assert not ok
assert (
"can_resize_soma_joinid_shape: new soma_joinid shape 0 < existing shape"
"tiledbsoma_resize_soma_joinid_shape: new soma_joinid shape 0 < existing shape"
in msg
)
with pytest.raises(tiledbsoma.SOMAError):
sdf.resize_soma_joinid_shape(new_shape)
sdf.tiledbsoma_resize_soma_joinid_shape(new_shape)
else:
assert ok
assert msg == ""
sdf.resize_soma_joinid_shape(new_shape)
sdf.tiledbsoma_resize_soma_joinid_shape(new_shape)

with tiledbsoma.DataFrame.open(uri) as sdf:
assert sdf._maybe_soma_joinid_shape == shape_at_create
Expand All @@ -349,7 +351,7 @@ def test_dataframe_basics(tmp_path, soma_joinid_domain, index_column_names):
# Test resize
new_shape = 0 if shape_at_create is None else shape_at_create + 100
with tiledbsoma.DataFrame.open(uri, "w") as sdf:
sdf.resize_soma_joinid_shape(new_shape)
sdf.tiledbsoma_resize_soma_joinid_shape(new_shape)

# Test writes out of old bounds, within new bounds, after resize
with tiledbsoma.DataFrame.open(uri, "w") as sdf:
Expand Down

0 comments on commit d7e6ff8

Please sign in to comment.