What’s Next

We’ve been testing the Cards application for most of this book. Cards is a Python pip-installable package. However, lots of Python projects are not installed with pip, such as simple single-file scripts and larger applications that are deployed in ways other than pip.

When testing non-pip-installable Python code, there are some gotchas. For example, in order for a test file to import another module, the module needs to be in the Python search path. And, without pip install, we need some other way to get the application code into the search path. The next chapter addresses these issues and walks through some solutions.

Get Python Testing with pytest 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.