예제 #1
0
 def test_mismatch_sets_expected(self):
     matcher = EndsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
예제 #2
0
 def test_mismatch_returns_does_not_end_with(self):
     matcher = EndsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotEndWith)
예제 #3
0
 def test_mismatch_sets_matchee(self):
     matcher = EndsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
예제 #4
0
 def test_match(self):
     matcher = EndsWith("arf")
     self.assertIs(None, matcher.match("barf"))
예제 #5
0
 def test_mismatch_sets_expected(self):
     matcher = EndsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
예제 #6
0
 def test_mismatch_sets_matchee(self):
     matcher = EndsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
예제 #7
0
 def test_mismatch_returns_does_not_end_with(self):
     matcher = EndsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotEndWith)
예제 #8
0
 def test_match(self):
     matcher = EndsWith("arf")
     self.assertIs(None, matcher.match("barf"))