summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-03-09 13:48:01 (GMT)
committerGitHub <noreply@github.com>2020-03-09 13:48:01 (GMT)
commit6012f30beff7fa8396718dfb198ccafc333c565b (patch)
tree54b0c8bbb4cc1c76ca7206edbd6133f71fc4d95c /Lib/test/_test_multiprocessing.py
parentdccd41e29fb9e75ac53c04ed3b097f51f8f65c4e (diff)
downloadcpython-6012f30beff7fa8396718dfb198ccafc333c565b.zip
cpython-6012f30beff7fa8396718dfb198ccafc333c565b.tar.gz
cpython-6012f30beff7fa8396718dfb198ccafc333c565b.tar.bz2
bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 73dc75d..b985d51 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -3274,6 +3274,19 @@ class _TestListener(BaseTestCase):
if self.TYPE == 'processes':
self.assertRaises(OSError, l.accept)
+ @unittest.skipUnless(util.abstract_sockets_supported,
+ "test needs abstract socket support")
+ def test_abstract_socket(self):
+ with self.connection.Listener("\0something") as listener:
+ with self.connection.Client(listener.address) as client:
+ with listener.accept() as d:
+ client.send(1729)
+ self.assertEqual(d.recv(), 1729)
+
+ if self.TYPE == 'processes':
+ self.assertRaises(OSError, listener.accept)
+
+
class _TestListenerClient(BaseTestCase):
ALLOWED_TYPES = ('processes', 'threads')