We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b883fea commit 33f0e09Copy full SHA for 33f0e09
xarray/tests/test_coding_strings.py
@@ -29,6 +29,15 @@ def test_vlen_dtype():
29
assert strings.check_vlen_dtype(np.dtype(object)) is None
30
31
32
+@pytest.mark.parametrize("numpy_str_type", (np.str, np.str_))
33
+def test_numpy_str_handling(numpy_str_type):
34
+ dtype = strings.create_vlen_dtype(numpy_str_type)
35
+ assert dtype.metadata["element_type"] == str
36
+ assert strings.is_unicode_dtype(dtype)
37
+ assert not strings.is_bytes_dtype(dtype)
38
+ assert strings.check_vlen_dtype(dtype) is str
39
+
40
41
def test_EncodedStringCoder_decode():
42
coder = strings.EncodedStringCoder()
43
0 commit comments