test_rover.py 421 B

12345678910111213141516
  1. from rover import Rover
  2. from rover.rover import DIRECTIONS
  3. def test_can_land():
  4. assert Rover()
  5. def test_has_location_and_direction():
  6. rover = Rover()
  7. assert isinstance(rover.location.x, int)
  8. assert isinstance(rover.location.y, int)
  9. assert rover.location.direction in DIRECTIONS
  10. def test_can_land_at_specified_location():
  11. rover = Rover(x=1, y=2, direction='E')
  12. assert rover.location.x == 1