Exemple #1
0
    def test_advanced_move(self):
        rover = Rover()

        rover.position_x = 5
        rover.position_y = 5
        rover.direction = 3

        rover.move()

        self.assertEqual(rover.position_x, 5)
        self.assertEqual(rover.position_y, 6)
Exemple #2
0
    def test_detect_bondaries_move(self):
        rover = Rover()

        rover.position_x = 5
        rover.position_y = 5
        rover.direction = 3

        rover.move()

        self.assertEqual(rover.position_x, 5)
        self.assertEqual(rover.position_y, 6)

        self.assertRaises(Exception,
                          lambda: self.plateau.detect_boundaries(rover))