def test_point_should_not_be_equal_to_any_other_object(self): p1 = Point(3,4); fakePoint = {}; fakePoint['__x'] = 3; fakePoint['__y'] = 4; try: self.assertFalse(p1.equals(fakePoint)) except Exception, e: self.assertEqual(e.message ,str(fakePoint)+' is not Point instance');
def test_point_should_not_be_equal_to_any_other_object(self): p1 = Point(3, 4) fakePoint = {} fakePoint['__x'] = 3 fakePoint['__y'] = 4 try: self.assertFalse(p1.equals(fakePoint)) except Exception, e: self.assertEqual(e.message, str(fakePoint) + ' is not Point instance')
def test_point_should_be_equal_to_same_point(self): p1 = Point(3,4); p2 = Point(3,4); self.assertTrue(p1.equals(p2)); self.assertTrue(p2.equals(p1));
def test_point_should_be_equal_to_same_point(self): p1 = Point(3, 4) p2 = Point(3, 4) self.assertTrue(p1.equals(p2)) self.assertTrue(p2.equals(p1))