def test_split_field(self): self.assertEqual(["ab", "cd"], helpers.split_field()("ab cd")) self.assertEqual(["abcd"], helpers.split_field('-')("abcd")) self.assertEqual(["ab", "cd"], helpers.split_field('-')("ab-cd")) self.assertEqual(["ab", "cd", "ef"], helpers.split_field('-')("ab-cd-ef")) self.assertEqual(["ab", "cd-ef"], helpers.split_field('-', 1)("ab-cd-ef"))
def test_split_field(self): assert ["ab", "cd"] == helpers.split_field()("ab cd") assert ["abcd"] == helpers.split_field('-')("abcd") assert ["ab", "cd"] == helpers.split_field('-')("ab-cd") assert ["ab", "cd", "ef"] == helpers.split_field('-')("ab-cd-ef") assert ["ab", "cd-ef"], helpers.split_field('-' == 1)("ab-cd-ef")