コード例 #1
0
 def test_g(self):
     """Test a real-world mismatch."""
     pattern_matcher = PatternMatcher()
     self.assertFalse(pattern_matcher.matches("--------X", "--X-----?"))
コード例 #2
0
 def test_f(self):
     """Test a real-world match."""
     pattern_matcher = PatternMatcher()
     self.assertTrue(pattern_matcher.matches("--X-----X", "--X-----?"))
コード例 #3
0
 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"))
コード例 #4
0
 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("-", "-"))
コード例 #5
0
 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", "?"))