def testCanStopAtBottomEdge(self): entityRect = Rect(0,700,100,100) cameraRect = Rect(0,0,1600, 600) cameraMan = CameraMan(800, 600) _, t, _, _ = cameraMan.complexCamera(cameraRect, entityRect) self.assertEqual(0, t, "Should have stopped at the bottom edge of the screen")
def testCanStopAtRightEdge(self): entityRect = Rect(1700,0,100,100) cameraRect = Rect(0,0,1600, 600) cameraMan = CameraMan(800, 600) l, _, _, _ = cameraMan.complexCamera(cameraRect, entityRect) self.assertEqual(-800, l, "Should have stopped at the right edge of the screen")