@@ -25,7 +25,7 @@ def test_minimal_attribute(self):
25
25
except :
26
26
pytest .fail (f"Could not parse attr._repr_html_(). Saw { attr ._repr_html_ ()} " )
27
27
28
- def test_attribute (self , capfd ):
28
+ def test_attribute_name_only (self , capfd ):
29
29
attr = tiledb .Attr ("foo" )
30
30
31
31
attr .dump ()
@@ -198,6 +198,16 @@ def test_datetime_attribute(self):
198
198
assert attr .dtype != np .dtype (np .datetime64 ("" , "Y" ))
199
199
assert attr .dtype != np .dtype (np .datetime64 )
200
200
201
+ @pytest .mark .parametrize ("dtype" , ["ascii" , "blob" , "wkb" , "wkt" ])
202
+ def test_nonnumpy_dtype_attribute (self , dtype ):
203
+ # Do not test wkb/wkt if not yet implemented in linked libtiledb.
204
+ if not hasattr (tiledb .cc .DataType , "GEOM_WKB" ) and (
205
+ dtype == "wkb" or dtype == "wkt"
206
+ ):
207
+ return
208
+ attr = tiledb .Attr ("non-numpy_dtype" , dtype = dtype )
209
+ self .assertEqual (attr , attr )
210
+
201
211
@pytest .mark .parametrize ("sparse" , [True , False ])
202
212
def test_ascii_attribute (self , sparse , capfd ):
203
213
path = self .path ("test_ascii" )
0 commit comments