From 7bd23bb6a795a13573f2cd2fe32903da066ac81b Mon Sep 17 00:00:00 2001 From: Ray Osborn Date: Sat, 30 Nov 2019 09:35:24 -0600 Subject: [PATCH] Add pytests for the new functions --- tests/test_fields.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_fields.py b/tests/test_fields.py index 77dd37a..623dd8b 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -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 @@ -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 @@ -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)))