Time for action - organizing tests from previous chapters

We're going to take our tests from the previous chapters and organize them all into a tree of directories. Then we'll use Nose to run them all.

  1. Create a directory to hold our code and tests; you can choose any name for it, but I'll refer to it as project here.
  2. Put pid.py, operations.py and testable.py inside of project. When we run nosetests in the project directory, modules (and packages) stored in project will be accessible to all of the tests, no matter where the test is stored in the directory tree.
  3. Create a subdirectory called test_chapter2, and place the test.txt and test.py files from Chapter 2 in it.
  4. Create a subdirectory called test_chapter3, and place the final pid.txt file from ...

Get Python Testing Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.