コード例 #1
0
 def test_right_spin_keyerror(self):
     with self.assertRaises(KeyError):
         MarsRoverInstructions.right_spin('SW')
コード例 #2
0
 def test_right_spin_keyerror(self):
     with self.assertRaises(KeyError):
         MarsRoverInstructions.right_spin('SW')
コード例 #3
0
 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')
コード例 #4
0
 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')