diff options
author | David Warde-Farley <wardefar@iro.umontreal.ca> | 2012-12-14 00:40:07 -0500 |
---|---|---|
committer | David Warde-Farley <wardefar@iro.umontreal.ca> | 2012-12-14 00:40:07 -0500 |
commit | 3a0b66e47f53f5664c281c7e4f63f3fe9ddd1f87 (patch) | |
tree | 7ddd6418c9538e31ca9d9674e3d56b292548be73 | |
parent | 5acc7df970c005ef52d87563450da3303db04467 (diff) | |
download | numpy-3a0b66e47f53f5664c281c7e4f63f3fe9ddd1f87.tar.gz |
TST: disable DeprecationWarning tests in 2.4
These DeprecationWarnings use a Python 2.5+ feature (PyIndex_Check) and
don't fire for 2.4 (support for which will be dropped shortly anyway).
-rw-r--r-- | numpy/core/tests/test_deprecations.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py index b7d1a7520..afc9277ff 100644 --- a/numpy/core/tests/test_deprecations.py +++ b/numpy/core/tests/test_deprecations.py @@ -2,9 +2,12 @@ Tests related to deprecation warnings. Also a convenient place to document how deprecations should eventually be turned into errors. """ -import numpy as np +import sys import warnings +from nose.plugins.skip import SkipTest +import numpy as np + def check_for_warning(f, category): raised = False @@ -47,6 +50,8 @@ class TestFloatIndexDeprecation(object): def test_deprecations(self): a = np.array([[[5]]]) + if sys.version_info[:2] < (2, 5): + raise SkipTest() yield check_for_warning, lambda: a[0.0], DeprecationWarning yield check_for_warning, lambda: a[0, 0.0], DeprecationWarning yield check_for_warning, lambda: a[0.0, 0], DeprecationWarning |