Session Ready
Exercise

Mark a test class as expected to fail

A new function model_test() is being developed and it returns the accuracy of a given linear regression model on a testing dataset. Test Driven Development (TDD) is being used to implement it. The procedure is: write tests first and then implement the function.

A test class TestModelTest has been created within the test module models/test_train.py. In the test class, there are two unit tests called test_on_linear_data() and test_on_one_dimensional_array(). But the function model_test() has not been implemented yet.

Throughout this exercise, pytest and numpy as np will be imported for you.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3

Question

Run the tests in the test class TestModelTest in the IPython console. What is the outcome?

Possible Answers