mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #11743: Rewrite multiprocessing connection classes in pure Python.
This commit is contained in:
parent
df77e3d4a0
commit
87cf220972
15 changed files with 490 additions and 983 deletions
|
@ -1915,9 +1915,15 @@ class TestInvalidHandle(unittest.TestCase):
|
|||
|
||||
@unittest.skipIf(WIN32, "skipped on Windows")
|
||||
def test_invalid_handles(self):
|
||||
conn = _multiprocessing.Connection(44977608)
|
||||
self.assertRaises(IOError, conn.poll)
|
||||
self.assertRaises(IOError, _multiprocessing.Connection, -1)
|
||||
conn = multiprocessing.connection.Connection(44977608)
|
||||
try:
|
||||
self.assertRaises((ValueError, IOError), conn.poll)
|
||||
finally:
|
||||
# Hack private attribute _handle to avoid printing an error
|
||||
# in conn.__del__
|
||||
conn._handle = None
|
||||
self.assertRaises((ValueError, IOError),
|
||||
multiprocessing.connection.Connection, -1)
|
||||
|
||||
#
|
||||
# Functions used to create test cases from the base ones in this module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue