def test_update_FpF(self): point = recDrawLSystem.Point(90) point.update("F") point.update("+") point.update("F") self.assertAlmostEqual(1, point.x) self.assertAlmostEqual(-1, point.y)
def test_update_mFpF_45d(self): point = recDrawLSystem.Point(45) point.update("-") point.update("F") point.update("+") point.update("F") self.assertAlmostEqual(1.7071068, point.x) self.assertAlmostEqual(0.7071068, point.y)
def test_update_F(self): point = recDrawLSystem.Point(90) point.update("F") self.assertEqual((1, 0), (point.x, point.y))
def test_update_minus(self): point = recDrawLSystem.Point(90) point.update("-") self.assertEqual(90, point.orientation)
def test_init(self): point = recDrawLSystem.Point(90) self.assertEqual((0, 0, 90), (point.x, point.y, point.angle))