Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,16 @@ To test if the installation was successful, you can run the slycot unit tests::

pytest --pyargs slycot

Running ``pytest`` without ``--pyargs slycot`` from inside the source directory
will fail, unless either ``setup.cfg`` or the compiled wrapper library have
been installed into that directory.
You may also run the tests by calling ``slycot.test()`` from within the python
interpreter::

import slycot
slycot.test()

Importing ``slycot`` or running ``pytest`` without ``--pyargs slycot`` from
inside the source directory will fail, unless the compiled wrapper library has
been installed into that directory. Note that the ``[tool:pytest]`` section
in ``setup.cfg`` enforces the ``--pyargs slycot`` argument by default.

General notes on compiling
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 5 additions & 4 deletions slycot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

if __SLYCOT_SETUP__:
import sys as _sys
_sys.stderr.write('Running from numpy source directory.\n')
_sys.stderr.write('Running from Slycot source directory.\n')
del _sys
else:

Expand Down Expand Up @@ -43,6 +43,7 @@
# Version information
from .version import version as __version__

from numpy.testing import Tester
test = Tester().test
bench = Tester().bench

def test():
import pytest
pytest.main(['--pyargs', 'slycot'])