def test_float(self): expected = 5.321 self.assertEqual(expected, write_utils.clean_string_att(expected))
def test_num_array(self): expected = [1, 2, 3.456] self.assertEqual(expected, write_utils.clean_string_att(expected))
def test_str_tuple(self): expected = ('a', 'bc', 'def') returned = write_utils.clean_string_att(expected) expected = np.array(expected, dtype='S') for exp, act in zip(expected, returned): self.assertEqual(exp, act)
def test_str(self): expected = 'test' self.assertEqual(expected, write_utils.clean_string_att(expected))