Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def test_issue_2227(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_SAME_LINE_TXT)
     self.assertTrue(re.search(regex, MATCH))
Exemplo n.º 3
0
 def test_single_and_double_quotes(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_TXT)
     self.assertTrue(re.search(regex, MATCH))
Exemplo n.º 4
0
 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_single_and_double_quotes(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_TXT)
     self.assertTrue(re.search(regex, MATCH))
 def test_issue_2227(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_SAME_LINE_TXT)
     self.assertTrue(re.search(regex, MATCH))