diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2017-07-17 17:06:33 -0700 |
---|---|---|
committer | Dan Schult <dschult@colgate.edu> | 2017-07-17 20:06:33 -0400 |
commit | 65115bc9e15760ec4925796ae48b75d4c8b61b9e (patch) | |
tree | 6acf3dede4226c4a31fdc8ad29f8a73c7ff9627f /INSTALL.rst | |
parent | 24e7dd35be46738c96fbc5f83ee9d8edca49750f (diff) | |
download | networkx-65115bc9e15760ec4925796ae48b75d4c8b61b9e.tar.gz |
Flatten doc hierarchy (#2520)
* Silence some sphinx warnings
* Update structure of documentation
See https://github.com/networkx/networkx/pull/2054
Diffstat (limited to 'INSTALL.rst')
-rw-r--r-- | INSTALL.rst | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/INSTALL.rst b/INSTALL.rst index b4269add..c1b66db7 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -113,3 +113,62 @@ To explicitly install all optional packages, do:: Or, install any optional package (e.g., `numpy`) individually:: $ pip install numpy + +Testing +------- + +NetworkX uses the Python `nose` testing package. If you don't already have +that package installed, follow the directions on the `nose homepage +<https://nose.readthedocs.org/>`_. + +Test a source distribution +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can test the complete package from the unpacked source directory with:: + + nosetests networkx -v + +Test an installed package +^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you have a file-based (not a Python egg) installation you can test the +installed package with:: + + >>> import networkx as nx + >>> nx.test() + +or:: + + python -c "import networkx as nx; nx.test()" + +Testing for developers +^^^^^^^^^^^^^^^^^^^^^^ + +You can test any or all of NetworkX by using the `nosetests` test runner. + +First make sure the NetworkX version you want to test is in your `PYTHONPATH` +(either installed or pointing to your unpacked source directory). + +Then you can run individual test files with:: + + nosetests path/to/file + +or all tests found in dir and an directories contained in dir:: + + nosetests path/to/dir + +By default nosetests does not test docutils style tests in +Python modules but you can turn that on with:: + + nosetests --with-doctest + +For doctests in stand-alone files NetworkX uses the extension `txt` so +you can add:: + + nosetests --with-doctest --doctest-extension=txt + +to also execute those tests. + +These options are on by default if you run nosetests from the root of the +NetworkX distribution since they are specified in the `setup.cfg` file found +there. |