def test_g(self): """Test a real-world mismatch.""" pattern_matcher = PatternMatcher() self.assertFalse(pattern_matcher.matches("--------X", "--X-----?"))
def test_f(self): """Test a real-world match.""" pattern_matcher = PatternMatcher() self.assertTrue(pattern_matcher.matches("--X-----X", "--X-----?"))
def test_d(self): """Test the mismatch of a non-critical ESF to a critical ESF pattern.""" pattern_matcher = PatternMatcher() self.assertFalse(pattern_matcher.matches("-", "X"))
def test_e(self): """Test the match of a non-critical ESF to a non-critical ESF pattern.""" pattern_matcher = PatternMatcher() self.assertTrue(pattern_matcher.matches("-", "-"))
def test_b(self): """Test the match of a critical ESF to a don't care ESF pattern.""" pattern_matcher = PatternMatcher() self.assertTrue(pattern_matcher.matches("X", "?"))