Skip to content

Commit

Permalink
Remove erroneous _ctx check for GroupMetadata (#1925)
Browse files Browse the repository at this point in the history
* Remove erroneous _ctx check for GroupMetadata

* Add test for sc-43221 fix

---------

Co-authored-by: Isaiah Norton <[email protected]>
  • Loading branch information
nguyenv and ihnorton authored Mar 16, 2024
1 parent c7ae5ba commit b71e8bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tiledb/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ def __iter__(self):
yield key

def __repr__(self):
# use safe repr if pybind11 constructor failed
if self._ctx is None:
return object.__repr__(self)

return str(dict(self._iter(keys_only=False)))

def setdefault(self, key, default=None):
Expand Down
6 changes: 6 additions & 0 deletions tiledb/tests/test_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ def test_sc27374_hilbert_default_tile_order(self):
assert A.schema.cell_order == "hilbert"
assert A.schema.tile_order is None

def test_sc43221(self):
# GroupMeta object did not have a representation test; repr failed due to non-existent attribute access in check.
tiledb.Group.create("mem://tmp1")
a = tiledb.Group("mem://tmp1")
repr(a.meta)


class SOMA919Test(DiskTestCase):
"""
Expand Down

0 comments on commit b71e8bc

Please sign in to comment.