def test_match_pattern(self):
     matcher = MultiMatcher(['xxx', 'f*'], ignore='.:')
     assert matcher.match('xxx')
     assert matcher.match('foo')
     assert matcher.match('..::FOO::..')
     assert not matcher.match('bar')
 def test_regexp_single_string_is_converted_to_list(self):
     matcher = MultiMatcher('one string', regexp=True)
     assert matcher.match('one string')
     assert not matcher.match('o')
     assert_equal(len(matcher), 1)
 def test_match_regexp_pattern(self):
     matcher = MultiMatcher(['xxx', 'f.*'], ignore='_:', regexp=True)
     assert matcher.match('xxx')
     assert matcher.match('foo')
     assert matcher.match('__::FOO::__')
     assert not matcher.match('bar')
 def test_single_string_is_converted_to_list(self):
     matcher = MultiMatcher('one string')
     assert matcher.match('one string')
     assert not matcher.match('o')
     assert_equals(len(matcher), 1)
 def test_match_pattern(self):
     matcher = MultiMatcher(['xxx', 'f*'], ignore='.:')
     assert matcher.match('xxx')
     assert matcher.match('foo')
     assert matcher.match('..::FOO::..')
     assert not matcher.match('bar')
Example #6
0
 def test_match_regexp_pattern(self):
     matcher = MultiMatcher(['xxx', 'f.*'], ignore='_:', regexp=True)
     assert matcher.match('xxx')
     assert matcher.match('foo')
     assert matcher.match('__::FOO::__')
     assert not matcher.match('bar')