コード例 #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', ''))