def testFailOnNegInf(self): test_string = '-inf' expect_answer = 'Value should be a real number.' answer = validate_component_table_cell_values._real_value(test_string) self.assertEqual(answer, expect_answer)
def testAcceptInt(self): test_string = "1" expect_answer = '' answer = validate_component_table_cell_values._real_value(test_string) self.assertEqual(answer, expect_answer)
def testAcceptSignedDec(self): test_string = '-0.1' expect_answer = '' answer = validate_component_table_cell_values._real_value(test_string) self.assertEqual(answer, expect_answer)
def testFailOnEmptySpace(self): test_string = "" expect_answer = 'Could not convert the given value to a float.' answer = validate_component_table_cell_values._real_value(test_string) self.assertEqual(answer, expect_answer)