Example #1
0
 def test_is_int_correct_multiple(self):
     value = "34"
     self.assertEqual(r.is_int(value), True)
Example #2
0
 def test_is_int_empty(self):
     value = ""
     self.assertEqual(r.is_int(value), False)
Example #3
0
 def test_is_int_False(self):
     value = 'word'
     self.assertEqual(r.is_int(value), False)
Example #4
0
 def test_is_int_correct(self):
     value = "1"
     self.assertEqual(r.is_int(value), True)
Example #5
0
 def test_valid_command_invalid(self):
     with captured_io(StringIO('Forward Forward 5')):
         self.assertEqual(robot.is_int('Forward 5'), False)
Example #6
0
 def test_is_int_false(self):
     with captured_io(StringIO('Forward hj')):
         self.assertEqual(robot.is_int('hj'), False)
Example #7
0
 def test_is_int_true(self):
     with captured_io(StringIO('Forward 10')):
         self.assertEqual(robot.is_int('10'), True)