Summary
We have finally covered the most important topic in Python programming: automated testing. After proving its importance and considering best design principles, we discussed the basic API for two popular Python 3 test frameworks. In particular we covered:
- Unit testing
- Test-driven development
- The
unittest
module - Assertion methods and code setup/cleanup
- The
py.test
framework - Code coverage
In the next chapter, we'll wrap up our learning with a compendium of object-oriented frameworks and libraries that work in Python 3.
Get Python 3 Object Oriented Programming 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.