© Kristian Rother 2017

Kristian Rother, Pro Python Best Practices, 10.1007/978-1-4842-2241-6_10

10. Writing a Test Suite

Kristian Rother

(1)Berlin, Germany

If you don’t care about quality, you can’t meet any other requirement.

—Gerald M. Weinberg

Up to now, we have been creating a set of test functions for our game. We can run all tests from the Linux command line simply by typing ‘py.test’ or ‘py.test filename.py’. If we are testing a larger program, the number of tests will easily grow into hundreds. With parameterized tests, even thousands of tests are common. How can we organize such a large number of tests and still use them efficiently?

To organize our tests better, we will create a test suite in this chapter. A test suite is a complete, structured ...

Get Pro Python Best Practices: Debugging, Testing and Maintenance 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.