Skip to content

Commit

Permalink
Add pytests for the new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rayosborn committed Nov 30, 2019
1 parent f804d13 commit 7bd23bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def test_string_field_creation(text):

assert field.nxvalue == text
assert field.dtype == string_dtype
assert field.is_string()
assert len(field) == 0


Expand All @@ -29,6 +30,7 @@ def test_byte_field_creation(text):
assert field.nxvalue == text
assert field.nxdata.decode(NX_ENCODING) == text
assert field.dtype != string_dtype
assert field.is_string()
assert len(field) == 0


Expand All @@ -42,6 +44,7 @@ def test_array_field_creation(arr):
assert field.shape == arr.shape
assert field.dtype == arr.dtype
assert field.size == arr.size
assert field.is_numeric()
assert len(field) == len(arr)
assert field.reshape((field.size)) == NXfield(arr.reshape((arr.size)))

Expand Down

0 comments on commit 7bd23bb

Please sign in to comment.