Esempio n. 1
0
 def _do_printobjs_test(self, doprint):
     a = [sphere()]
     b = [sphere(radius=10)]
     try:
         assert_compare(a, b, doprint)
         raise NotImplementedError()
     except AssertionError as ex:
         func = self.assertIn if doprint else self.assertNotIn
         func(str(a), ex.args[0])
         func(str(b), ex.args[0])
Esempio n. 2
0
 def testRaiseOnInequality(self):
     with self.assertRaises(AssertionError):
         assert_compare('a', 'b')
Esempio n. 3
0
 def testEqualityDoesNotRaise(self):
     assert_compare('a', 'a')