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])
def testRaiseOnInequality(self): with self.assertRaises(AssertionError): assert_compare('a', 'b')
def testEqualityDoesNotRaise(self): assert_compare('a', 'a')