mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #15770: Check invalid arguments in test function. Patch by Victor Stinner.
This commit is contained in:
parent
f21587e3a8
commit
66e63170d9
2 changed files with 17 additions and 3 deletions
|
@ -1212,6 +1212,8 @@ class TestBufferProtocol(unittest.TestCase):
|
|||
self.assertRaises(TypeError, get_contiguous, nd, PyBUF_READ, 961)
|
||||
self.assertRaises(UnicodeEncodeError, get_contiguous, nd, PyBUF_READ,
|
||||
'\u2007')
|
||||
self.assertRaises(ValueError, get_contiguous, nd, PyBUF_READ, 'Z')
|
||||
self.assertRaises(ValueError, get_contiguous, nd, 255, 'A')
|
||||
|
||||
# cmp_contig()
|
||||
nd = ndarray([1], shape=[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue