summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2013-12-16 16:50:35 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2014-02-06 17:52:00 +0100
commit4e92b2b4d6a8e09dbbc659fa1a721550c7bd9c8d (patch)
treea4f16e01f14cc052c4375dbfd498ee4f5959f0e9
parentb99396899cfba88ee51ef7a09e69c03bb0979212 (diff)
downloadnumpy-4e92b2b4d6a8e09dbbc659fa1a721550c7bd9c8d.tar.gz
TST: Fix buggy ref-count test
-rw-r--r--numpy/core/tests/test_indexing.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/tests/test_indexing.py b/numpy/core/tests/test_indexing.py
index 7b75df858..b500ada18 100644
--- a/numpy/core/tests/test_indexing.py
+++ b/numpy/core/tests/test_indexing.py
@@ -253,10 +253,12 @@ class TestIndexing(TestCase):
a = np.array([0])
refcount = sys.getrefcount(np.dtype(np.intp))
# item setting always checks indices in seperate function:
- a[np.array([1], dtype=np.intp)] = 1
- a[np.array([1], dtype=np.uint8)] = 1
a[np.array([0], dtype=np.intp)] = 1
a[np.array([0], dtype=np.uint8)] = 1
+ assert_raises(IndexError, a.__setitem__,
+ np.array([1], dtype=np.intp), 1)
+ assert_raises(IndexError, a.__setitem__,
+ np.array([1], dtype=np.uint8), 1)
assert_equal(sys.getrefcount(np.dtype(np.intp)), refcount)