Example #1
0
 def test_describe(self):
     self.assertEquals("Actual 'spam' does not match 'eggs'",
                       MatchesMatcher("eggs").describe("spam"))
Example #2
0
 def test_should_match_empty_string(self):
     self.assertTrue(MatchesMatcher('').matches('spam'))
Example #3
0
 def test_should_match_wildcard_string(self):
     self.assertTrue(MatchesMatcher('.{4}').matches('spam'))
Example #4
0
 def test_should_not_match_no_partial_string(self):
     self.assertFalse(MatchesMatcher('egg').matches('spam'))
Example #5
0
 def test_should_match_suffix_string(self):
     self.assertTrue(MatchesMatcher('.*am$').matches('spam'))
Example #6
0
 def test_should_match_prefix_string(self):
     self.assertTrue(MatchesMatcher('^spa').matches('spam'))
Example #7
0
 def test_should_match_partial_string(self):
     self.assertTrue(MatchesMatcher('.pa.').matches('spam'))
Example #8
0
 def test_should_match_full_string(self):
     self.assertTrue(MatchesMatcher('^spam$').matches('spam'))