summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-04-01 15:19:09 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-04-01 15:19:09 (GMT)
commit709176f10c1774f608a318171a94371e7d05d98f (patch)
tree8b9f881e5ddd25e8ac8be7de98a69afe838965d2 /Lib/test/test_multiprocessing.py
parent58bb82e7b4b50fa5efaefc1196bd927992fbe783 (diff)
downloadcpython-709176f10c1774f608a318171a94371e7d05d98f.zip
cpython-709176f10c1774f608a318171a94371e7d05d98f.tar.gz
cpython-709176f10c1774f608a318171a94371e7d05d98f.tar.bz2
Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under non-Windows platforms. Patch by Popa Claudiu.
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 8edb420..8de7a8d 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2319,8 +2319,20 @@ class TestStdinBadfiledescriptor(unittest.TestCase):
flike.flush()
assert sio.getvalue() == 'foo'
+
+#
+# Issue 14151: Test invalid family on invalid environment
+#
+
+class TestInvalidFamily(unittest.TestCase):
+
+ @unittest.skipIf(WIN32, "skipped on Windows")
+ def test_invalid_family(self):
+ with self.assertRaises(ValueError):
+ multiprocessing.connection.Listener(r'\\.\test')
+
testcases_other = [OtherTest, TestInvalidHandle, TestInitializers,
- TestStdinBadfiledescriptor]
+ TestStdinBadfiledescriptor, TestInvalidFamily]
#
#