Skip to content
Snippets Groups Projects
Commit ef361d46 authored by Christoph Groth's avatar Christoph Groth
Browse files

stop advertising the running of tests to end users

I've realized that this was broken. (The tests were not installed and could be
only run for inplace-builds linked from somewhere else.)  Fixing this would be
somewhat hacky.  I think now that it was a bad idea in the first place to
advertise the running of unit tests to end users.
parent 5e7f9750
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,6 @@ The following software is highly recommended though not strictly required:
that will in many cases speed up kwant several times and reduce the memory
footprint.
Suggested:
- The `nose <http://nose.readthedocs.org/>`_ testing framework is required to
run the extensive tests included with kwant.
Generic instructions
====================
......@@ -51,12 +46,6 @@ subdirectory, e.g.::
cd tutorial
python 1-quantum_wire_revisited.py
If "nose" is installed, you can also run the tests ::
python -c 'import kwant; kwant.test()'
from some directory *other* than the kwant distribution's root directory.
System-specific instructions
============================
......@@ -262,5 +251,4 @@ extension). You will need Cython 0.17.1 if you want to modify them.
kwant includes extensive unit tests which are supposed to cover all of its
functionality. We use the `nose <http://nose.readthedocs.org/>`_ testing
framework. To run the tests, execute the command ``nosetests`` from the root
directory of the package after it has been built in place. You can also
``import kwant`` inside Python and run ``kwant.test()``.
directory of the package after it has been built in place.
......@@ -27,22 +27,3 @@ try:
except ImportError:
from .solvers.sparse import solve
__all__.append('solve')
def runtest():
"""Run the tests included with kwant."""
import os.path
try:
import nose
except ImportError:
msg = 'No module named nose.\n(See INSTALL.txt in ' \
'the top-level directory of the kwant distribution.)'
raise ImportError(msg)
kwant_dir = os.path.dirname(__file__)
if os.path.basename(kwant_dir) == kwant_dir:
msg = 'Do not call kwant.test from within the kwant source ' \
'distribution directory.\nYou can run "nosetests -s" instead.'
raise RuntimeError(msg)
nose.run(defaultTest=kwant_dir)
# This trick avoids recursive execution of tests by nosetests.
test = runtest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment