예제 #1
0
 def test_is_number_valid_negative_float_succeed(self):
     s = '-123.456'
     result = is_number(s)
     self.assertEqual(result, True)
예제 #2
0
 def test_is_number_random_string_fail(self):
     s = 'random_string'
     result = is_number(s)
     self.assertEqual(result, False)
예제 #3
0
 def test_is_number_valid_int_succeed(self):
     s = '123'
     result = is_number(s)
     self.assertEqual(result, True)
예제 #4
0
 def test_is_number_empty_string_fail(self):
     s = ''
     result = is_number(s)
     self.assertEqual(result, False)
예제 #5
0
 def test_is_number_none_fail(self):
     s = None
     result = is_number(s)
     self.assertEqual(result, False)
예제 #6
0
 def test_is_number_random_string_fail(self):
     s = 'random_string'
     result = is_number(s)
     self.assertEqual(result, False)
예제 #7
0
 def test_is_number_none_fail(self):
     s = None
     result = is_number(s)
     self.assertEqual(result, False)
예제 #8
0
 def test_is_number_empty_string_fail(self):
     s = ''
     result = is_number(s)
     self.assertEqual(result, False)
예제 #9
0
 def test_is_number_valid_negative_float_succeed(self):
     s = '-123.456'
     result = is_number(s)
     self.assertEqual(result, True)
예제 #10
0
 def test_is_number_valid_int_succeed(self):
     s = '123'
     result = is_number(s)
     self.assertEqual(result, True)