mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Issue #18934: Relax test_multiprocessing.test_invalid_handles a bit: we just
want to check that Connection.poll() doesn't crash.
This commit is contained in:
parent
b0478b3f5f
commit
6703bb4984
1 changed files with 4 additions and 1 deletions
|
@ -2958,8 +2958,11 @@ class TestInvalidHandle(unittest.TestCase):
|
||||||
@unittest.skipIf(WIN32, "skipped on Windows")
|
@unittest.skipIf(WIN32, "skipped on Windows")
|
||||||
def test_invalid_handles(self):
|
def test_invalid_handles(self):
|
||||||
conn = multiprocessing.connection.Connection(44977608)
|
conn = multiprocessing.connection.Connection(44977608)
|
||||||
|
# check that poll() doesn't crash
|
||||||
try:
|
try:
|
||||||
self.assertRaises((ValueError, OSError), conn.poll)
|
conn.poll()
|
||||||
|
except (ValueError, OSError):
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
# Hack private attribute _handle to avoid printing an error
|
# Hack private attribute _handle to avoid printing an error
|
||||||
# in conn.__del__
|
# in conn.__del__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue