Read the original article on my blog
In this second installment of the Hypermodern Python series, I’m going to discuss how to add automated testing to your project, and how to teach the random fact generator foreign languages.¹ Previously, we discussed How to set up a Python project. (If you start reading here, you can also download the code for the previous chapter.)
Here are the topics covered in this chapter on Testing in Python:
- Unit testing with pytest
- Code coverage with Coverage.py
- Test automation with Nox
- Mocking with pytest-mock
- Example CLI: Refactoring
- Example CLI: Handling exceptions gracefully
- Example CLI: Selecting the Wikipedia language edition
- Using fakes
- End-to-end testing
Here is a full list of the articles in this series: