def test_on_float_valued_string(self): test_argument = "6.9" expected = None actual = convert_to_int(test_argument) assert actual == expected, "Expected: None, Actual: {0}".format(actual)
def test_on_string_with_missing_comma(self): test_argument = "178100,301" expected = None actual = convert_to_int(test_argument) assert actual == expected, "Expected: None, Actual: {0}".format(actual)
def test_on_string_with_incorrectly_placed_comma(self): test_argument = "12,72,891" expected = None actual = convert_to_int(test_argument) assert actual == expected, "Expected: None, Actual: {0}".format(actual)
def test_with_two_commas(self): test_argument = "1,034,891" expected = 1034891 actual = convert_to_int(test_argument) assert actual == expected, "Expected: 1034891, Actual: {0}".format( actual)
def test_with_one_comma(self): test_argument = "2,081" expected = 2081 actual = convert_to_int(test_argument) assert actual == expected, "Expected: 2081, Actual: {0}".format(actual)
def test_with_no_comma(self): test_argument = "756" expected = 756 actual = convert_to_int(test_argument) assert actual == expected, "Expected: 756, Actual: {0}".format(actual)