O'Reilly logo

Python Testing Cookbook by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the project-level script to run this chapter's BDD tests

In this chapter, we have developed several tactics to write and exercise BDD tests. This should help us in developing new projects. An invaluable tool for any project is having a top-level script used to manage things like packaging, bundling, and testing.

This recipe shows how to create a command-line project script that will run all the tests we created in this chapter using the various runners.

Getting ready

For this recipe, we need to have coded all the recipes from this chapter.

How to do it...

With the following steps, we will create a project-level script that will run all the test recipes from this chapter.

  1. Create a new file called recipe34.py.
  2. Add code that uses the getopt library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required