summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-06 20:52:43 (GMT)
committerGitHub <noreply@github.com>2018-12-06 20:52:43 (GMT)
commit6485aa6eb1024672f08afdd577e2b5792eb6b03c (patch)
tree56d314bba51eb6f4305f401a9b1633bc26bc16dc /Lib/test/test_ssl.py
parent560fa4db17983ce37c1453c057901c627b2c3abc (diff)
downloadcpython-6485aa6eb1024672f08afdd577e2b5792eb6b03c.zip
cpython-6485aa6eb1024672f08afdd577e2b5792eb6b03c.tar.gz
cpython-6485aa6eb1024672f08afdd577e2b5792eb6b03c.tar.bz2
bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934)
(cherry picked from commit 42b1d6127bd8595522a78a75166ebb9fba74a6a2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index d4132c5..f1b9565 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -480,8 +480,12 @@ class BasicSocketTests(unittest.TestCase):
self.assertRaises(OSError, ss.recvfrom_into, bytearray(b'x'), 1)
self.assertRaises(OSError, ss.send, b'x')
self.assertRaises(OSError, ss.sendto, b'x', ('0.0.0.0', 0))
+ self.assertRaises(NotImplementedError, ss.dup)
self.assertRaises(NotImplementedError, ss.sendmsg,
[b'x'], (), 0, ('0.0.0.0', 0))
+ self.assertRaises(NotImplementedError, ss.recvmsg, 100)
+ self.assertRaises(NotImplementedError, ss.recvmsg_into,
+ [bytearray(100)])
def test_timeout(self):
# Issue #8524: when creating an SSL socket, the timeout of the
@@ -3410,10 +3414,11 @@ class ThreadedTests(unittest.TestCase):
# Make sure sendmsg et al are disallowed to avoid
# inadvertent disclosure of data and/or corruption
# of the encrypted data stream
+ self.assertRaises(NotImplementedError, s.dup)
self.assertRaises(NotImplementedError, s.sendmsg, [b"data"])
self.assertRaises(NotImplementedError, s.recvmsg, 100)
self.assertRaises(NotImplementedError,
- s.recvmsg_into, bytearray(100))
+ s.recvmsg_into, [bytearray(100)])
s.write(b"over\n")
self.assertRaises(ValueError, s.recv, -1)