summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2012-09-13 15:40:25 +0100
committerMatthew Brett <matthew.brett@gmail.com>2012-09-16 12:51:53 +0100
commit69afd27b870cd85f06c4409fcffd0734ddb2fe76 (patch)
treee542a75dc296700efe84200265c692e1ae04cf8d
parent4475eadaa879cdc82f5331abc22ab47b99e6b040 (diff)
downloadnumpy-69afd27b870cd85f06c4409fcffd0734ddb2fe76.tar.gz
TST: test DeprecationWarning raised by concatenate
From review by Nathaniel - thanks.
-rw-r--r--numpy/core/tests/test_shape_base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/core/tests/test_shape_base.py b/numpy/core/tests/test_shape_base.py
index 72828271b..b3f781980 100644
--- a/numpy/core/tests/test_shape_base.py
+++ b/numpy/core/tests/test_shape_base.py
@@ -218,6 +218,14 @@ def test_concatenate_sloppy0():
assert_array_equal(concatenate((r4, r3), 10), r4 + r3)
finally:
warnings.filters.pop(0)
+ # Confurm DepractionWarning raised
+ warnings.simplefilter('always', DeprecationWarning)
+ warnings.simplefilter('error', DeprecationWarning)
+ try:
+ assert_raises(DeprecationWarning, concatenate, (r4, r3), 10)
+ finally:
+ warnings.filters.pop(0)
+ warnings.filters.pop(0)
if __name__ == "__main__":