From 65115bc9e15760ec4925796ae48b75d4c8b61b9e Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Mon, 17 Jul 2017 17:06:33 -0700 Subject: Flatten doc hierarchy (#2520) * Silence some sphinx warnings * Update structure of documentation See https://github.com/networkx/networkx/pull/2054 --- INSTALL.rst | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'INSTALL.rst') 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 +`_. + +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. -- cgit v1.2.1