コード例 #1
0
 def test_mismatch_sets_expected(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
コード例 #2
0
 def test_mismatch_returns_does_not_start_with(self):
     matcher = StartsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotStartWith)
コード例 #3
0
 def test_mismatch_sets_matchee(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
コード例 #4
0
 def test_match(self):
     matcher = StartsWith("bar")
     self.assertIs(None, matcher.match("barf"))
コード例 #5
0
ファイル: test_basic.py プロジェクト: AlexOreshkevich/mongo
 def test_mismatch_sets_expected(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("bar", mismatch.expected)
コード例 #6
0
ファイル: test_basic.py プロジェクト: AlexOreshkevich/mongo
 def test_mismatch_sets_matchee(self):
     matcher = StartsWith("bar")
     mismatch = matcher.match("foo")
     self.assertEqual("foo", mismatch.matchee)
コード例 #7
0
ファイル: test_basic.py プロジェクト: AlexOreshkevich/mongo
 def test_mismatch_returns_does_not_start_with(self):
     matcher = StartsWith("bar")
     self.assertIsInstance(matcher.match("foo"), DoesNotStartWith)
コード例 #8
0
ファイル: test_basic.py プロジェクト: AlexOreshkevich/mongo
 def test_match(self):
     matcher = StartsWith("bar")
     self.assertIs(None, matcher.match("barf"))