Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Running the test suite

1) Setting up Apache

- You must have a valid Apache 2 installation, responding to start and stop
commands. The test suite will launch an Apache instance with its own
configuration file, on its own TCP/IP port, so hopefully it won't break
anything on your Apache setup.

- If you're running the Apache Monitor under Win32 (the tray icon that shows the
state of the Apache Server), you'll notice that it will show the status of the
test server during the tests. Unfortunately once the tests are over the monitor
does not revert back to showing the status of your Apache server. The server
itself is still running, though.

2) Setting up mod_python source code

- The source code is required because the unit test aren't provided in the
binary distributions.

- Get it from or using SVN from : 

- We'll suppose you've extracted or checked it out in a directory

- Either you run the MOD_PYTHON/configure script...

- ..or if you're under Win32, then running the configure script
may be too much of a hassle. We advise you to copy
MOD_PYTHON/test/ to MOD_PYTHON/test/
and edit this file as described in the comments.

3) Building and/or installing mod_python binaries

- If you're really adventurous, you may want to build mod_python from source.
Then it's either "./configure; make; make install" on Unix, or running 
MOD_PYTHON/dist/build_installer.bat on Win32.

- The best way to ensure that the test suite will run is to install the target 
mod_python binaries on your system. The complete list of binaries (including
Win32 ones) can be found following the "Other Binaries" link on :

- Running your own version of mod_python without installing it is possible and 
useful if you cannot be root, but you're a bit on your own, sorry. You'll have 
to make sure MOD_PYTHON/ points to the right version of and tweak Apache user's PYTHONPATH environment variable so that
mod_python can find its Python modules.

4) Running the test suite

In the current directory, just launch the script :


You should see a bunch of text scrolling by as the tests unfold. If everything
goes well, you should see two lines around the end of the unput, one with :

Ran 43 tests in 17.955s


and the other with :

Ran 6 tests in 70.942s


Of course the number of tests will vary in the future, but what's important here
are the two shiny "OK". This means the tests were successful.

5) Report the results

Now you can report your success to ! Of course if
it's not successful and you're sure it's not due to a problem in your setup,
we're also interested. Send us the full output of the test suite, or at least
the stack trace of the failed tests.

Thanks for your time spent of running those tests !