diff options
| -rw-r--r-- | numpy/testing/tests/test_decorators.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/testing/tests/test_decorators.py b/numpy/testing/tests/test_decorators.py index 02cd9fb88..1258a9296 100644 --- a/numpy/testing/tests/test_decorators.py +++ b/numpy/testing/tests/test_decorators.py @@ -1,3 +1,7 @@ +""" +Test the decorators from ``testing.decorators``. + +""" from __future__ import division, absolute_import, print_function import warnings @@ -13,6 +17,7 @@ def test_slow(): assert_(slow_func.slow) + def test_setastest(): @dec.setastest() def f_default(a): @@ -30,6 +35,7 @@ def test_setastest(): assert_(f_istest.__test__) assert_(not f_isnottest.__test__) + class DidntSkipException(Exception): pass @@ -182,5 +188,13 @@ def test_deprecated(): assert_raises(AssertionError, deprecated_func3) +@dec.parametrize('base, power, expected', + [(1, 1, 1), + (2, 1, 2), + (2, 2, 4)]) +def test_parametrize(base, power, expected): + assert_(base**power == expected) + + if __name__ == '__main__': run_module_suite() |
