Пример #1
0
 def test_is_pos_int_valid_int_succeed(self):
     s = '123'
     result = is_pos_int(s)
     self.assertEqual(result, True)
Пример #2
0
 def test_is_pos_int_float_fail(self):
     s = '123.456'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #3
0
 def test_is_pos_int_negative_int_fail(self):
     s = '-123'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #4
0
 def test_is_pos_int_none_fail(self):
     s = None
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #5
0
 def test_is_pos_int_random_string_fail(self):
     s = 'random_string'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #6
0
 def test_is_pos_int_valid_int_succeed(self):
     s = '123'
     result = is_pos_int(s)
     self.assertEqual(result, True)
Пример #7
0
 def test_is_pos_int_empty_string_fail(self):
     s = ''
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #8
0
 def test_is_pos_int_negative_int_fail(self):
     s = '-123'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #9
0
 def test_is_pos_int_float_fail(self):
     s = '123.456'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #10
0
 def test_is_pos_int_random_string_fail(self):
     s = 'random_string'
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #11
0
 def test_is_pos_int_none_fail(self):
     s = None
     result = is_pos_int(s)
     self.assertEqual(result, False)
Пример #12
0
 def test_is_pos_int_empty_string_fail(self):
     s = ''
     result = is_pos_int(s)
     self.assertEqual(result, False)