1. Learn
  2. /
  3. Courses
  4. /
  5. Unit Testing for Data Science in Python

Exercise

Reasoning in the test result report

In the last exercises, you marked the test class TestModelTest in the test module models/test_train.py as expected to fail. You also marked the test test_on_clean_file() in the test class TestGetDataAsNumpyArray belonging to the test module features/test_as_numpy.py as skipped if the Python version is greater than 2.7.

In both cases, you provided a reason argument which detailed why they are expected to fail or skipped. In this exercise, your job is to make this reason show up in the test result report when you run all tests in the IPython console.

Feel free to run the !pytest command with different options and flags in the IPython console while doing the exercise.

Instructions 1/3

undefined XP
    1
    2
    3

Question

What is the command that would only show the reason for expected failures in the test result report?

Possible answers