diff --git a/INSTALL.txt b/INSTALL.txt index a009fb9450f1a6f7722cb6fa8de042e798d4bed4..8e8e3fe3d3a63a254fb3f8315775db0db612dd33 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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. diff --git a/kwant/__init__.py b/kwant/__init__.py index b5766a5364258ba8c83e9076fe2259a2d60ab4e0..ff4d188c2d0f042e0d6648cb56035aba14fb92db 100644 --- a/kwant/__init__.py +++ b/kwant/__init__.py @@ -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