Skip to content

Commit 48152a5

Browse files
committed
add a test for creating UnytDTYpe from Unit
1 parent f8570fd commit 48152a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unytdtype/tests/test_unytdtype.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ def test_dtype_creation():
88
dtype = UnytDType("m")
99
assert str(dtype) == "UnytDType('m')"
1010

11+
dtype2 = UnytDType(unyt.Unit('m'))
12+
assert str(dtype2) == "UnytDType('m')"
13+
assert dtype == dtype2
14+
1115

1216
def test_creation_from_zeros():
1317
dtype = UnytDType("m")

0 commit comments

Comments
 (0)