def test_mismatch_sets_expected(self):
     matcher = Contains("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
 def test_mismatch_returns_does_not_start_with(self):
     matcher = Contains("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotContain)
 def test_mismatch_sets_matchee(self):
     matcher = Contains("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
 def test_match(self):
     matcher = Contains("bar")
     self.assertIs(None, matcher.match("foo bar baz"))
Example #5
0
 def test_mismatch_sets_expected(self):
     matcher = Contains("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
Example #6
0
 def test_mismatch_sets_matchee(self):
     matcher = Contains("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
Example #7
0
 def test_mismatch_returns_does_not_start_with(self):
     matcher = Contains("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotContain)
Example #8
0
 def test_match(self):
     matcher = Contains("bar")
     self.assertIs(None, matcher.match("foo bar baz"))