Exercises
In ch4/cache/test_slower.py, there is an autouse fixture called check_duration(). You used it in the Chapter 4 exercises as well. Now, let’s make a plugin out of it.
- Create a directory named pytest-slower that will hold the code for the new plugin, similar to the directory described in Creating an Installable Plugin.
- Fill out all the files of the directory to make pytest-slower an installable plugin.
- Write some test code for the plugin.
- Take a look at the Python Package Index and search for “pytest-.” Find a pytest plugin that looks interesting to you.
- Install the plugin you chose and try it out on Tasks tests.