def test_right_spin_keyerror(self): with self.assertRaises(KeyError): MarsRoverInstructions.right_spin('SW')
def test_right_spin(self): self.assertEqual(MarsRoverInstructions.right_spin('N'), 'E') self.assertEqual(MarsRoverInstructions.right_spin('E'), 'S') self.assertEqual(MarsRoverInstructions.right_spin('S'), 'W') self.assertEqual(MarsRoverInstructions.right_spin('W'), 'N')