Exercises

  1. In ch4/cache/test_slower.py, there is an autouse fixture called check_duration(). Copy it into ch3/tasks_proj/tests/conftest.py.
  2. Run the tests in Chapter 3.
  3. For tests that are really fast, 2x really fast is still really fast. Instead of 2x, change the fixture to check for 0.1 second plus 2x the last duration.
  4. Run pytest with the modified fixture. Do the results seem reasonable?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.218