예제 #1
0
파일: test_util.py 프로젝트: Lukasa/urllib3
 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)
예제 #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)
예제 #3
0
파일: test_util.py 프로젝트: by46/urllib3
 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)
예제 #4
0
 def test_split_first(self, input, expected):
     output = split_first(*input)
     assert output == expected
예제 #5
0
 def test_split_first(self, input, expected):
     output = split_first(*input)
     assert output == expected