Skip to content

Commit 59d95dc

Browse files
committed
Add test
1 parent 8bf02fc commit 59d95dc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tiledb/tests/test_fixes.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,31 @@ def test_sc56611(self):
354354
tiledb.from_numpy(uri, data, sparse=True)
355355
assert str(exc_info.value) == "from_numpy only supports dense arrays"
356356

357+
@pytest.mark.parametrize(
358+
"array_data",
359+
[
360+
np.array([b"", b"1", b"", b"", b"f", b""], dtype="S"),
361+
np.array([b"", b"1", b"", b"", b"f", b"3"], dtype="S"),
362+
],
363+
)
364+
def test_sc62594_buffer_resize(self, array_data):
365+
uri = self.path("test_agis")
366+
dom = tiledb.Domain(
367+
tiledb.Dim(name="dim", domain=(0, 5), tile=2, dtype=np.int64),
368+
)
369+
370+
schema = tiledb.ArraySchema(
371+
domain=dom, sparse=False, attrs=[tiledb.Attr(name="a", dtype="S", var=True)]
372+
)
373+
374+
tiledb.DenseArray.create(uri, schema)
375+
376+
with tiledb.DenseArray(uri, mode="w") as T:
377+
T[...] = array_data
378+
379+
with tiledb.DenseArray(uri) as T:
380+
assert_array_equal(array_data, T)
381+
357382

358383
class SOMA919Test(DiskTestCase):
359384
"""

0 commit comments

Comments
 (0)