def test_regexp_matcher(self):
     matcher = Matcher('F .*', ignore=['-'], caseless=False, spaceless=True,
                       regexp=True)
     assert matcher.pattern == 'F .*'
     assert matcher.match('Foo')
     assert matcher.match('--Foo')
     assert not matcher.match('foo')
Beispiel #2
0
 def test_regexp_matcher(self):
     matcher = Matcher('F .*', ignore=['-'], caseless=False, spaceless=True,
                       regexp=True)
     assert matcher.pattern == 'F .*'
     assert matcher.match('Foo')
     assert matcher.match('--Foo')
     assert not matcher.match('foo')
 def test_regexp_match_any(self):
     matcher = Matcher('H.llo', regexp=True)
     assert matcher.match_any(('Hello', 'world'))
     assert matcher.match_any(['jam', 'is', 'hillo'])
     assert not matcher.match_any(('no', 'match', 'here'))
     assert not matcher.match_any(())
 def test_match_any(self):
     matcher = Matcher('H?llo')
     assert matcher.match_any(('Hello', 'world'))
     assert matcher.match_any(['jam', 'is', 'hillo'])
     assert not matcher.match_any(('no', 'match', 'here'))
     assert not matcher.match_any(())
 def _matches_not(self, string, pattern, **config):
     assert not Matcher(pattern, **config).match(string), pattern
 def test_match_any(self):
     matcher = Matcher('H?llo')
     assert matcher.match_any(('Hello', 'world'))
     assert matcher.match_any(['jam', 'is', 'hillo'])
     assert not matcher.match_any(('no', 'match', 'here'))
     assert not matcher.match_any(())
Beispiel #7
0
 def test_regexp_match_any(self):
     matcher = Matcher('H.llo', regexp=True)
     assert matcher.match_any(('Hello', 'world'))
     assert matcher.match_any(['jam', 'is', 'hillo'])
     assert not matcher.match_any(('no', 'match', 'here'))
     assert not matcher.match_any(())