Session Ready
Exercise

Write an informative test failure message

The test result reports become a lot easier to read when you make good use of the optional message argument of the assert statement.

In a previous exercise, you wrote a test for the convert_to_int() function. The function takes an integer valued string with commas as thousand separators e.g. "2,081" as argument and should return the integer 2081.

In this exercise, you will rewrite the test called test_on_string_with_one_comma() so that it prints an informative message if the test fails.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Format the message string so that it shows the actual return value.