diff options
author | Furkan Onder <furkanonder@protonmail.com> | 2023-10-23 09:50:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 09:50:07 (GMT) |
commit | d4d947dd718c49e75f55e3b13bb7645b839d45b5 (patch) | |
tree | 82efecb813058390919d117f768b71fb681fbe9d /Lib/test/test_ssl.py | |
parent | 4d781bce2704f32b2ff4ddb0f7d97701a565b3e6 (diff) | |
download | cpython-d4d947dd718c49e75f55e3b13bb7645b839d45b5.zip cpython-d4d947dd718c49e75f55e3b13bb7645b839d45b5.tar.gz cpython-d4d947dd718c49e75f55e3b13bb7645b839d45b5.tar.bz2 |
[3.12] gh-67565: Add tests for C-contiguity checks (GH-110951) (GH-111198)
(cherry picked from commit 9376728ce45191fcc0b908c7487ad7985454537e)
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 06304dc..d8ae7b7 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1739,6 +1739,10 @@ class MemoryBIOTests(unittest.TestCase): self.assertEqual(bio.read(), b'bar') bio.write(memoryview(b'baz')) self.assertEqual(bio.read(), b'baz') + m = memoryview(bytearray(b'noncontig')) + noncontig_writable = m[::-2] + with self.assertRaises(BufferError): + bio.write(memoryview(noncontig_writable)) def test_error_types(self): bio = ssl.MemoryBIO() |