Chapter 5Plugins
As powerful as pytest is right out of the box, it gets even better when you add plugins to the mix. The pytest code base is structured with customization and extensions, and there are hooks available to allow modifications and improvements through plugins.
It might surprise you to know that you’ve already written some plugins if you’ve worked through the previous chapters in this book. Any time you put fixtures and/or hook functions into a project’s top-level conftest.py file, you created a local conftest plugin. It’s just a little bit of extra work to convert these conftest.py files into installable plugins that you can share between projects, with other people, or with the world.
We will start this chapter looking at where ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access