summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraypad.py
diff options
context:
space:
mode:
authorMark Harfouche <mark.harfouche@gmail.com>2018-09-15 15:34:12 -0400
committerMark Harfouche <mark.harfouche@gmail.com>2018-09-15 15:34:12 -0400
commitba0683043e4d60ce931337f221627997339f69e2 (patch)
tree21039785f72e6593c996f2e75bc8abbe257375e5 /numpy/lib/tests/test_arraypad.py
parent09ea273d45d26f8d12d4b27c7851e1a4c7180b83 (diff)
downloadnumpy-ba0683043e4d60ce931337f221627997339f69e2.tar.gz
Don't use None to valid the array as it is the "Default" for empty
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r--numpy/lib/tests/test_arraypad.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
index 7318e9ef2..f84319dbf 100644
--- a/numpy/lib/tests/test_arraypad.py
+++ b/numpy/lib/tests/test_arraypad.py
@@ -504,13 +504,16 @@ class TestConstant(object):
def test_check_object_array(self):
arr = np.empty(1, dtype=object)
- obj = object()
- arr = np.pad(arr, pad_width=1, mode='constant', constant_values=obj)
+ obj_a = object()
+ arr[0] = obj_a
+ obj_b = object()
+ arr = np.pad(arr, pad_width=1, mode='constant', constant_values=obj_b)
expected = np.empty((3, ), dtype=object)
- expected[...] = obj
- expected[1] = None
-
+ expected[0] = obj_b
+ expected[1] = obj_a
+ expected[2] = obj_b
+
assert_array_equal(arr, expected)
class TestLinearRamp(object):