From 8b2a78e3a7ba4c8c6d14eb46869c5e25dd8ef7f0 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 8 Oct 2019 23:51:08 -0700 Subject: Update testing instructions --- INSTALL.rst | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) (limited to 'INSTALL.rst') diff --git a/INSTALL.rst b/INSTALL.rst index f0288e0f..93aa67cc 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -118,20 +118,23 @@ Or, install any optional package (e.g., ``numpy``) individually:: Testing ------- -NetworkX uses the Python ``nose`` testing package. If you don't already have -that package installed, follow the directions on the `nose homepage -`_. +NetworkX uses the Python ``pytest`` testing package. You can learn more +about pytest on their `homepage `_. Test a source distribution ^^^^^^^^^^^^^^^^^^^^^^^^^^ You can test the complete package from the unpacked source directory with:: - nosetests networkx -v + pytest networkx Test an installed package ^^^^^^^^^^^^^^^^^^^^^^^^^ +From a shell command prompt you can test the installed package with:: + + pytest -pyargs networkx + If you have a file-based (not a Python egg) installation you can test the installed package with:: @@ -143,35 +146,3 @@ or:: python -c "import networkx as nx; nx.test()" .. autofunction:: networkx.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