def test_start_on_paren(self): self.assertEqual(extract_range('(a b c d) e f g'), ('a b c d', ' e f g'))
def test_unclosed_left(self): self.assertEqual(extract_range('a b c ( d e f'), ('', 'a b c ( d e f'))
def test_no_parens(self): self.assertEqual(extract_range('a b c d e f'), ('', 'a b c d e f'))
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'))
def test_multiple_parens(self): self.assertEqual(extract_range('(a, b, c)(d, e, f)'), ('a, b, c', '(d, e, f)'))
def test_only_parens(self): self.assertEqual(extract_range('(a, b, c)'), ('a, b, c', ''))