Chapter 7: Pytest fixtures and plugins
Alfredo Deza
In previous chapters, the extensibility and ease of use of Pytest have been praised. Running tests with its command-line tool, executing functions, or test methods, are all very straightforward. What happens when a project needs some tests to have a different setup or behave differently with command-line flags that are not offered as part of the default Pytest installation? The Pytest framework has extensive support for adding and manipulating almost every aspect of its engine.
At first, I felt intimidated by plugins. My experience with writing plugins for other frameworks and tools (even in Python tools) hasn’t been too good. Lots of quirks and oddities that are hard to remember. Not quite ...
Get Testing In Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.