February 2022
Intermediate to advanced
274 pages
6h 28m
English
In this section, we’ll walk through the process of going from local conftest plugin to installable plugin. Even if you never put your own plugins up on PyPI, it’s good to walk through the process at least once. The experience will help you when reading code from open source plugins, and you’ll be better equipped to judge if the plugins can help you or not.
First, we need to create a new directory for our plugin code. The name of the top-level directory doesn’t really matter. We’ll call it pytest_skip_slow:
| | pytest_skip_slow |
| | ├── examples |
| | │ └── test_slow.py |
| | └── pytest_skip_slow.py |
Here test_slow.py was moved into an examples directory. We’ll use it as-is later when automating tests for the plugin. Our conftest.py ...