Skip to content

Commit

Permalink
VLEN test update (#171)
Browse files Browse the repository at this point in the history
* add --names option for hsls

* add test for unitialized vlen dset
  • Loading branch information
jreadey authored Mar 4, 2024
1 parent e96f480 commit 5cdd09b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/hl/test_vlentype.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ def test_create_vlen_dset(self):

dset1 = f.create_dataset("dset1", shape=(2,), dtype=dtvlen)

# try reading uninitialized values
ret_val = dset1[...]
self.assertTrue(isinstance(ret_val, np.ndarray))
self.assertEqual(len(ret_val), 2)
e0 = ret_val[0]
self.assertTrue(isinstance(e0, np.ndarray))
self.assertEqual(e0.shape, (0,))
e1 = ret_val[1]
self.assertTrue(isinstance(e1, np.ndarray))
self.assertEqual(e1.shape, (0,))

# create numpy object array
e0 = np.array([1,2,3],dtype='uint16')
e1 = np.array([1,2,3,4],dtype='uint16')
Expand Down

0 comments on commit 5cdd09b

Please sign in to comment.