Exemplo n.º 1
0
 def test_mismatch_sets_expected(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
Exemplo n.º 2
0
 def test_mismatch_returns_does_not_start_with(self):
     matcher = StartsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotStartWith)
Exemplo n.º 3
0
 def test_mismatch_sets_matchee(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
Exemplo n.º 4
0
 def test_match(self):
     matcher = StartsWith("bar")
     self.assertIs(None, matcher.match("barf"))
Exemplo n.º 5
0
 def test_mismatch_sets_expected(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
Exemplo n.º 6
0
 def test_mismatch_sets_matchee(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
Exemplo n.º 7
0
 def test_mismatch_returns_does_not_start_with(self):
     matcher = StartsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotStartWith)
Exemplo n.º 8
0
 def test_match(self):
     matcher = StartsWith("bar")
     self.assertIs(None, matcher.match("barf"))