Пример #1
0
 def test_start_on_paren(self):
     self.assertEqual(extract_range('(a b c d) e f g'),
                      ('a b c d', ' e f g'))
Пример #2
0
 def test_unclosed_left(self):
     self.assertEqual(extract_range('a b c ( d e f'),
                      ('', 'a b c ( d e f'))
Пример #3
0
 def test_no_parens(self):
     self.assertEqual(extract_range('a b c d e f'),
                      ('', 'a b c d e f'))
Пример #4
0
 def test_part_of_string_after(self):
     self.assertEqual(extract_range('a b c (1 2 3) d e f'),
                      ('1 2 3', 'a b c  d e f'))
Пример #5
0
 def test_multiple_parens(self):
     self.assertEqual(extract_range('(a, b, c)(d, e, f)'),
                      ('a, b, c', '(d, e, f)'))
Пример #6
0
 def test_only_parens(self):
     self.assertEqual(extract_range('(a, b, c)'), ('a, b, c', ''))