Skip to content

Commit 15facaa

Browse files
committed
add numpy/nose tester
1 parent 0a587f3 commit 15facaa

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,15 @@ seaborn.despine(fig=fig)
3232
```
3333

3434
![Alt text](docs/img/example.png "Example axes")
35+
36+
## Testing
37+
38+
Testing is generally done via the ``nose`` and ``numpy.testing`` modules.
39+
The best way to run the tests is in an interactive python session:
40+
41+
```python
42+
import matplotlib
43+
matplotib.use('agg')
44+
import probscale
45+
probscale.test()
46+
```

docs/index.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,31 @@ Tutorial
5454

5555
tutorial/getting_started.rst
5656

57+
Testing
58+
-------
59+
60+
It's easiest to run the tests from an interactive python session:
61+
62+
.. code-block:: python
63+
64+
import matplotlib
65+
matplotlib.use('agg')
66+
import probscale
67+
probscale.test()
68+
69+
5770
API References
5871
--------------
5972

6073
.. toctree::
6174
:maxdepth: 2
6275

63-
probscale.rst
6476
viz.rst
65-
66-
67-
77+
probscale.rst
6878

6979
Indices and tables
7080
==================
7181

7282
* :ref:`genindex`
7383
* :ref:`modindex`
7484
* :ref:`search`
75-

probscale/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
from .probscale import ProbScale
55

66
scale.register_scale(ProbScale)
7+
8+
from numpy.testing import Tester
9+
test = Tester().test

0 commit comments

Comments
 (0)