summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@gmail.com>2020-03-24 15:47:30 -0700
committerGitHub <noreply@github.com>2020-03-24 17:47:30 -0500
commit54c2a266780c02852003330f59bf3bf20e36eaa0 (patch)
tree6eb4604dfc34b662b0e752f80e2a5f1407e6afa4 /numpy/core/tests
parent974a54058fe52ead24bc54a0015d3e065f78f5e3 (diff)
downloadnumpy-54c2a266780c02852003330f59bf3bf20e36eaa0.tar.gz
BUG: Break on all errors when performing strided casts. (gh-15827)
Errors raised when casting some strided arrays are not caught. See gh-15790.
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_regression.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 0cb1207d9..18d5b6032 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1412,6 +1412,8 @@ class TestRegression:
# gh-15790
a = np.array([u'\x80'] * 129, dtype='U3')
assert_raises(UnicodeEncodeError, np.array, a, 'S')
+ b = a.reshape(3, 43)[:-1, :-1]
+ assert_raises(UnicodeEncodeError, np.array, b, 'S')
def test_mixed_string_unicode_array_creation(self):
a = np.array(['1234', u'123'])