Skip to content

Commit

Permalink
add test of new string unicode handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Rama Vasudevan committed May 24, 2024
1 parent dd9221c commit 30facac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/base/test_string_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def test_str_tuple(self):
expected = np.array(expected, dtype='S')
for exp, act in zip(expected, returned):
self.assertEqual(exp, act)

def test_string_unicode_handling(self):
expected = ['a', 'bc', 'µm']
returned = clean_string_att(expected)
for ind,x in enumerate(expected):
assert returned[ind].decode('utf-8') == expected[ind]



class TestFormattedStrToNum(unittest.TestCase):
Expand Down

0 comments on commit 30facac

Please sign in to comment.