diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-06-17 00:23:20 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-06-17 00:23:20 +0000 |
commit | c331857d8663ecf54bbe88c834755da749e8ab52 (patch) | |
tree | f4cc69ec328a5ff4d3b108f3610acb119a196493 /numpy/random | |
parent | 22ba7886a84dc6a16ca75871f7cd2f10ef8de1f9 (diff) | |
download | numpy-c331857d8663ecf54bbe88c834755da749e8ab52.tar.gz |
Switched to use nose to run tests. Added test and bench functions to all modules.
Diffstat (limited to 'numpy/random')
-rw-r--r-- | numpy/random/__init__.py | 6 | ||||
-rw-r--r-- | numpy/random/tests/test_random.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/numpy/random/__init__.py b/numpy/random/__init__.py index 5a7423208..723285874 100644 --- a/numpy/random/__init__.py +++ b/numpy/random/__init__.py @@ -13,6 +13,6 @@ def __RandomState_ctor(): """ return RandomState() -def test(level=1, verbosity=1): - from numpy.testing import NumpyTest - return NumpyTest().test(level, verbosity) +from numpy.testing.pkgtester import Tester +test = Tester().test +bench = Tester().bench diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index 793803252..c42b02442 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -2,7 +2,7 @@ from numpy.testing import * from numpy import random import numpy as np -class TestMultinomial(NumpyTestCase): +class TestMultinomial(TestCase): def test_basic(self): random.multinomial(100, [0.2, 0.8]) @@ -16,7 +16,7 @@ class TestMultinomial(NumpyTestCase): assert np.all(x < -1) -class TestSetState(NumpyTestCase): +class TestSetState(TestCase): def setUp(self): self.seed = 1234567890 self.prng = random.RandomState(self.seed) @@ -62,4 +62,4 @@ class TestSetState(NumpyTestCase): if __name__ == "__main__": - NumpyTest().run() + nose.run(argv=['', __file__]) |