def test_build_whitespace_split_regex(self): expected_regex = '(?m)^(?:[\\s]+)?Lorem(?:[\\s]+)?ipsum(?:[\\s]+)?dolor(?:[\\s]+)?sit(?:[\\s]+)?amet\\,' \ '(?:[\\s]+)?$' ret = utils.build_whitespace_split_regex(' '.join(LORUM_IPSUM.split()[:5])) self.assertEqual(ret, expected_regex)
def test_issue_2227(self): regex = build_whitespace_split_regex(SINGLE_DOUBLE_SAME_LINE_TXT) self.assertTrue(re.search(regex, MATCH))
def test_single_and_double_quotes(self): regex = build_whitespace_split_regex(SINGLE_DOUBLE_TXT) self.assertTrue(re.search(regex, MATCH))