def test_on_normal_argument_1(): actual = row_to_list("123\t4,567\n") # Fill in with the expected return value for the argument "123\t4,567\n" expected = ["123", "4,567"] assert actual == expected, "Expected: {0}, Actual: {1}".format(expected, actual)
def test_on_normal_argument_2(): actual = row_to_list("1,059\t186,606\n") expected = ["1,059", "186,606"] # Write the assert statement along with a failure message assert actual == expected, "Expected: {0}, Actual: {1}".format(actual, expected)
def test_on_one_tab_with_missing_value(): # (1, 1) boundary value actual = row_to_list("\t4,567\n") # Format the failure message assert actual is None, "Expected: None, Actual: {0}".format(actual)
def test_on_two_tabs_with_missing_value(): # (0, 1) case # Assign to the actual return value for the argument "123\t\t89\n" actual = "123\t\t89\n" # Write the assert statement with a failure message assert row_to_list(actual) is None, "Expected: None, Actual: {0}".format(actual)
def test_on_no_tab_no_missing_value(): # (0, 0) boundary value # Assign actual to the return value for the argument "123\n" actual = row_to_list("123\n") assert actual is None, "Expected: None, Actual: {0}".format(actual)
def test_on_two_tabs_no_missing_value(): # (2, 0) boundary value actual = row_to_list("123\t4,567\t89\n") # Complete the assert statement assert actual is None, "Expected: None, Actual: {0}".format(actual)
def test_on_no_tab_with_missing_value(): # (0, 1) case # Assign to the actual return value for the argument "\n" actual = row_to_list("\n") # Write the assert statement with a failure message assert actual is None, "Expected: None, Actual: {0}".format(actual)
def test_for_missing_area(): assert row_to_list("\t293,410\n") is None
def test_for_clean_row(): assert row_to_list("2,081\t314, 942\n") == ["2,081", "314,942"]
def test_for_missing_area_with_message(): actual = row_to_list("\t293, 410\n") expected = None message = ("row_to_list('\t293, 410\n') returned{0} instead of {1}".format( actual, expected)) assert actual is expected, message
def test_for_missing_tab(): assert row_to_list("1,463238, 765\n") is None