summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-03-31 18:06:19 -0500
committerGitHub <noreply@github.com>2020-03-31 18:06:19 -0500
commitc381719745b6c7c29817a569ce0d431e2cd72ff5 (patch)
tree148c8339bac1d8639641c24de175d01d79ae5ab6
parent5ae9f65f3d8a991baa14575af2b34c8665e97559 (diff)
downloadnumpy-c381719745b6c7c29817a569ce0d431e2cd72ff5.tar.gz
Apply suggestions from code review
-rw-r--r--numpy/core/tests/test_nditer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/tests/test_nditer.py b/numpy/core/tests/test_nditer.py
index 7eca9ec3a..c106c528d 100644
--- a/numpy/core/tests/test_nditer.py
+++ b/numpy/core/tests/test_nditer.py
@@ -2689,12 +2689,14 @@ def test_0d_iter():
assert_equal(i.ndim, 0)
assert_equal(len(i), 1)
- i = nditer(np.arange(5), ['multi_index'], [['readonly']], op_axes=[()], itershape=())
+ i = nditer(np.arange(5), ['multi_index'], [['readonly']],
+ op_axes=[()], itershape=())
assert_equal(i.ndim, 0)
assert_equal(len(i), 1)
# passing an itershape alone is not enough, the op_axes are also needed
- assert_raises(ValueError, nditer, np.arange(5), ['multi_index'], [['readonly']], itershape=())
+ with assert_raises(ValueError):
+ nditer(np.arange(5), ['multi_index'], [['readonly']], itershape=())
# Test a more complex buffered casting case (same as another test above)
sdt = [('a', 'f4'), ('b', 'i8'), ('c', 'c8', (2, 3)), ('d', 'O')]