MCPcopy Create free account
hub / github.com/davidblewett/rure-python / test_findall

Method test_findall

rure/tests/test_regexobject.py:23–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 self.assertTrue(pattern.match(u"dog", 1))
22
23 def test_findall(self):
24 haystack = u"abc xyz"
25 pattern = rure.compile(u"\\w+(\\w)")
26 matches = pattern.findall(haystack)
27 self.assertEqual(len(matches), 2)
28 self.assertEqual(matches, [u'c', u'z'])
29
30 def test_finditer(self):
31 haystack = u"abc xyz"

Callers

nothing calls this directly

Calls 2

compileMethod · 0.80
findallMethod · 0.80

Tested by

no test coverage detected