def test_split_first(self): test_cases = { ('abcd', 'b'): ('a', 'cd', 'b'), ('abcd', 'cb'): ('a', 'cd', 'b'), ('abcd', ''): ('abcd', '', None), ('abcd', 'a'): ('', 'bcd', 'a'), ('abcd', 'ab'): ('', 'bcd', 'a'), } for input, expected in test_cases.items(): output = split_first(*input) self.assertEqual(output, expected)
def test_split_first(self): test_cases = { ("abcd", "b"): ("a", "cd", "b"), ("abcd", "cb"): ("a", "cd", "b"), ("abcd", ""): ("abcd", "", None), ("abcd", "a"): ("", "bcd", "a"), ("abcd", "ab"): ("", "bcd", "a"), } for input, expected in test_cases.items(): output = split_first(*input) self.assertEqual(output, expected)
def test_split_first(self, input, expected): output = split_first(*input) assert output == expected