def testTransform_ValidMatrix(self):
     '''Transform applies successfully.'''
     p = Point(3, 4)
     r = applyHomogeneousTransform(p, 0, 1, 0, -1, 0, 0, 0, 0, 1)
     self.assertTrue(type(r) is Point)
     self.assertEqual(r.x(), 4)
     self.assertEqual(r.y(), -3)
 def testTransform_ValidMatrix(self):
     '''Transform applies successfully.'''
     p = Point(3, 4)
     r = applyHomogeneousTransform(p, 0, 1, 0, -1, 0, 0, 0, 0, 1)
     self.assertTrue(type(r) is Point)
     self.assertEqual(r.x(), 4)
     self.assertEqual(r.y(), -3)
 def testTransform_InvalidMatrix(self):
     '''Transform does not apply successfully.'''
     p = Point(3, 4)
     r = applyHomogeneousTransform(p, 1, 0, 0, 0, 1, 0, 0, 0, 0)
     self.assertTrue(r is None)
 def testTransform_InvalidMatrix(self):
     '''Transform does not apply successfully.'''
     p = Point(3, 4)
     r = applyHomogeneousTransform(p, 1, 0, 0, 0, 1, 0, 0, 0, 0)
     self.assertTrue(r is None)