diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-01 15:25:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-04-01 15:25:49 (GMT) |
commit | 93bba8fb8a9c6c6d5df33fed8ca9a17975b45c34 (patch) | |
tree | dd629860c909d42b1de5754a58954227e114b1ab /Lib/test/test_multiprocessing.py | |
parent | 0261d754cd7f6bedf7415d94b18b7b631bfa8a63 (diff) | |
parent | 709176f10c1774f608a318171a94371e7d05d98f (diff) | |
download | cpython-93bba8fb8a9c6c6d5df33fed8ca9a17975b45c34.zip cpython-93bba8fb8a9c6c6d5df33fed8ca9a17975b45c34.tar.gz cpython-93bba8fb8a9c6c6d5df33fed8ca9a17975b45c34.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.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index d65cf6e..b4f511c 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -2638,8 +2638,20 @@ class TestWait(unittest.TestCase): p.join() +# +# 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, TestWait] + TestStdinBadfiledescriptor, TestWait, TestInvalidFamily] # # |