@@ -2278,22 +2278,16 @@ def test_sparse_mixed_domain_uint_float64(self, fx_sparse_cell_order):
22782278 ],
22792279 )
22802280 def test_sparse_string_domain (
2281- self , coords , expected_ned , allows_duplicates , sparse_cell_order
2281+ self , coords , expected_ned , allows_duplicates , fx_sparse_cell_order
22822282 ):
2283- # if sparse_cell_order in ("hilbert", "row-major", "col-major") and allows_duplicates == True:
2284- # if tiledb.libtiledb.version() < (2, 8):
2285- # pytest.xfail(
2286- # "Skipping known bug with legacy reader and empty strings"
2287- # )
2288-
22892283 path = self .path ("sparse_string_domain" )
22902284 dom = tiledb .Domain (tiledb .Dim (name = "d" , domain = (None , None ), dtype = np .bytes_ ))
22912285 att = tiledb .Attr (name = "a" , dtype = np .int64 )
22922286 schema = tiledb .ArraySchema (
22932287 domain = dom ,
22942288 attrs = (att ,),
22952289 sparse = True ,
2296- cell_order = sparse_cell_order ,
2290+ cell_order = fx_sparse_cell_order ,
22972291 allows_duplicates = allows_duplicates ,
22982292 capacity = 10000 ,
22992293 )
@@ -2302,30 +2296,29 @@ def test_sparse_string_domain(
23022296 data = [1 , 2 , 3 , 4 ][: len (coords )]
23032297
23042298 with tiledb .open (path , "w" ) as A :
2305- breakpoint ()
23062299 A [coords ] = data
23072300
23082301 with tiledb .open (path ) as A :
23092302 ned = A .nonempty_domain ()[0 ]
2310- self . assertEqual (A .nonempty_domain (), ((tuple (expected_ned )),))
2303+ assert_array_equal (A .nonempty_domain (), ((tuple (expected_ned )),))
23112304
23122305 if not (
2313- sparse_cell_order in ("hilbert" , "row-major" , "col-major" )
2306+ fx_sparse_cell_order in ("hilbert" , "row-major" , "col-major" )
23142307 and allows_duplicates == True
23152308 ):
23162309 assert_array_equal (A [ned [0 ] : ned [1 ]]["a" ], data )
23172310 self .assertEqual (set (A [ned [0 ] : ned [1 ]]["d" ]), set (coords ))
23182311
2319- if allows_duplicates and sparse_cell_order != "hilbert" :
2320- res_u1 = A .query (order = "U" ).multi_index [ned [0 ] : ned [1 ]]
2312+ if allows_duplicates and fx_sparse_cell_order != "hilbert" :
2313+ res_u1 = A .query ().multi_index [ned [0 ] : ned [1 ]]
23212314 assert_array_equal (res_u1 ["a" ], data )
23222315 self .assertEqual (set (res_u1 ["d" ]), set (coords ))
23232316
2324- res_u2 = A .query (order = "U" )[ned [0 ] : ned [1 ]]
2317+ res_u2 = A .query ()[ned [0 ] : ned [1 ]]
23252318 assert_array_equal (res_u2 ["a" ], data )
23262319 self .assertEqual (set (res_u2 ["d" ]), set (coords ))
23272320
2328- def test_sparse_string_domain2 (self , sparse_cell_order ):
2321+ def test_sparse_string_domain2 (self , fx_sparse_cell_order ):
23292322 path = self .path ("sparse_string_domain2" )
23302323 with self .assertRaises (ValueError ):
23312324 dims = [
0 commit comments