Reusing test code#

Learning Objectives#

After working through this topic, you should be able to:

  • employ pytest’s parametrize feature to use the same test function with different input parameters

  • write granular tests with little extra effort and without code duplication

  • remember where to look if you need to parametrize expected results, too

  • explain what fixtures are and how read up on

Materials#

Here is the Screencast and these are the slides.

Additional Materials#

Quiz#