Beispiel #1
0
 def test_constructor_no_arguments(self):
     mismatch = Mismatch()
     self.assertThat(mismatch.describe,
         Raises(MatchesException(NotImplementedError)))
     self.assertEqual({}, mismatch.get_details())
Beispiel #2
0
 def test_forwards_details(self):
     x = Mismatch("description", {'foo': 'bar'})
     decorated = MismatchDecorator(x)
     self.assertEqual(x.get_details(), decorated.get_details())
Beispiel #3
0
 def test_forwards_details(self):
     x = Mismatch('description', {'foo': 'bar'})
     annotated = AnnotatedMismatch("annotation", x)
     self.assertEqual(x.get_details(), annotated.get_details())
Beispiel #4
0
 def test_constructor_arguments(self):
     mismatch = Mismatch("some description", {'detail': "things"})
     self.assertEqual("some description", mismatch.describe())
     self.assertEqual({'detail': "things"}, mismatch.get_details())
 def test_forwards_details(self):
     x = Mismatch('description', {'foo': 'bar'})
     annotated = AnnotatedMismatch("annotation", x)
     self.assertEqual(x.get_details(), annotated.get_details())
Beispiel #6
0
 def test_forwards_details(self):
     x = Mismatch("description", {"foo": "bar"})
     annotated = AnnotatedMismatch("annotation", x)
     self.assertEqual(x.get_details(), annotated.get_details())
Beispiel #7
0
 def test_constructor_no_arguments(self):
     mismatch = Mismatch()
     self.assertThat(mismatch.describe,
                     Raises(MatchesException(NotImplementedError)))
     self.assertEqual({}, mismatch.get_details())
Beispiel #8
0
 def test_constructor_arguments(self):
     mismatch = Mismatch("some description", {'detail': "things"})
     self.assertEqual("some description", mismatch.describe())
     self.assertEqual({'detail': "things"}, mismatch.get_details())
Beispiel #9
0
 def test_forwards_details(self):
     x = Mismatch("description", {'foo': 'bar'})
     decorated = MismatchDecorator(x)
     self.assertEqual(x.get_details(), decorated.get_details())