diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-08-23 13:53:45 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-08-23 13:53:45 (GMT) |
commit | 66e63170d9aa8cf41a772b0d22b20c47636d24f5 (patch) | |
tree | 29b15f54cfe392bae18d1d7c4ec7a51457dcfe3a /Lib/test/test_buffer.py | |
parent | f21587e3a805f8ced02dc65c54195bb26740a0ad (diff) | |
download | cpython-66e63170d9aa8cf41a772b0d22b20c47636d24f5.zip cpython-66e63170d9aa8cf41a772b0d22b20c47636d24f5.tar.gz cpython-66e63170d9aa8cf41a772b0d22b20c47636d24f5.tar.bz2 |
Issue #15770: Check invalid arguments in test function. Patch by Victor Stinner.
Diffstat (limited to 'Lib/test/test_buffer.py')
-rw-r--r-- | Lib/test/test_buffer.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py index 80f4346..fb85dae 100644 --- a/Lib/test/test_buffer.py +++ b/Lib/test/test_buffer.py @@ -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]) |