8000 FIX: Add a test for Ticket #2066 · seberg/numpy@2f28db6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f28db6

Browse files
committed
FIX: Add a test for Ticket numpy#2066
1 parent ca29849 commit 2f28db6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/core/tests/test_regression.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,10 @@ def test_searchsorted_wrong_dtype(self):
17421742
# proper exception.
17431743
a = np.array([('a', 1)], dtype='S1, int')
17441744
assert_raises(TypeError, np.searchsorted, a, 1.2)
1745+
# Ticket #2066, similar problem:
1746+
dtype = np.format_parser(['i4', 'i4'], [], [])
1747+
a = np.recarray((2, ), dtype)
1748+
assert_raises(TypeError, np.searchsorted, a, 1)
17451749

17461750
if __name__ == "__main__":
17471751
run_module_suite()

0 commit comments

Comments
 (0)
0