Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 def test_split_first(self, input, expected):
     output = split_first(*input)
     assert output == expected
Exemplo n.º 5
0
 def test_split_first(self, input, expected):
     output = split_first(*input)
     assert output == expected