summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_shape_base.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py
index 55b008871..d6d01ba99 100644
--- a/numpy/lib/tests/test_shape_base.py
+++ b/numpy/lib/tests/test_shape_base.py
@@ -100,9 +100,12 @@ class TestArraySplit(TestCase):
def test_integer_split_2D_rows(self):
a = array([arange(10), arange(10)])
- res = array_split(a, 3, axis=0)
+ res = assert_warns(FutureWarning, array_split, a, 3, axis=0)
+
+ # After removing the FutureWarning, the last should be zeros((0, 10))
desired = [array([arange(10)]), array([arange(10)]), array([])]
compare_results(res, desired)
+ assert_(a.dtype.type is res[-1].dtype.type)
def test_integer_split_2D_cols(self):
a = array([arange(10), arange(10)])
@@ -116,9 +119,12 @@ class TestArraySplit(TestCase):
""" This will fail if we change default axis
"""
a = array([arange(10), arange(10)])
- res = array_split(a, 3)
+ res = assert_warns(FutureWarning, array_split, a, 3)
+
+ # After removing the FutureWarning, the last should be zeros((0, 10))
desired = [array([arange(10)]), array([arange(10)]), array([])]
compare_results(res, desired)
+ assert_(a.dtype.type is res[-1].dtype.type)
#perhaps should check higher dimensions
def test_index_split_simple(self):