Skip to content

Commit

Permalink
fix text decoding in test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Aug 15, 2024
1 parent c4772d7 commit d975445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_io_hdf5_h5tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_write_dataset_lol_strings(self):
a = [['aa', 'bb'], ['cc', 'dd']]
self.io.write_dataset(self.f, DatasetBuilder('test_dataset', a, attributes={}))
dset = self.f['test_dataset']
decoded_dset = [[item.decode('utf-8') for item in sublist if isinstance(item, bytes)]
decoded_dset = [[item.decode('utf-8') if isinstance(item, bytes) else item for item in sublist]
for sublist in dset[:]]
self.assertTrue(decoded_dset == a)

Expand Down

0 comments on commit d975445

Please sign in to comment.