示例#1
0
class TestInvertingMatcher(unittest.TestCase):
    def setUp(self):
        self.matcher = InvertingMatcher(DefaultMatcher())

    def test_does_not_match_catch_all(self):
        self.assertFalse(
            self.matcher.matches(CATCH_ALL_PATTERN, "line"),
            "Catch all matches line")

    def test_matches_unmatchable(self):
        self.assertTrue(
            self.matcher.matches(CATCH_NOTHING_PATTERN, "line"),
            "Unmatchable pattern does not match line")
示例#2
0
 def setUp(self):
     self.matcher = InvertingMatcher(DefaultMatcher())