These files are for testing the methods and functions in NX.

The tests use Python's docutils format and may be executed 
using the Python doctest and unittest framework
to verify the functionality of the package.
You will need Python 2.4 or a later version.

The tests also demonstrate the usage of many of the features of NX.

There are three ways to run the entire test suite:

  - from the source package directory root
    python setup.py test

  - from the test directory in the source package
    python test.py

  - from anywhere (also works with an installed version)
    >>> import networkx.tests
    >>> networkx.tests.run()

To run the tests for an individual module execute the module file
directly.  E.g. to test the base.py module run (in the directory with base.py)

python base.py

To produce formatted output of all of the tests run
"make doc" and html format will be produced in the directory html/
You must have rst2html.py installed to do this (rst2html is part of the python
docutils package).


The python module benchmark.py can be used to compare relative speed of small
code bits using the timeit module for different graph classes.
