diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-09-06 19:12:22 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-09-06 19:12:22 (GMT) |
commit | 6703bb4984c708132937a94f58c2bae93c6a829b (patch) | |
tree | 3d6283fa4f993d58aa6b5d865b89383510c3a18f /Lib/test | |
parent | b0478b3f5fb4db47b7f924ef57fa5aa38600f0bd (diff) | |
download | cpython-6703bb4984c708132937a94f58c2bae93c6a829b.zip cpython-6703bb4984c708132937a94f58c2bae93c6a829b.tar.gz cpython-6703bb4984c708132937a94f58c2bae93c6a829b.tar.bz2 |
Issue #18934: Relax test_multiprocessing.test_invalid_handles a bit: we just
want to check that Connection.poll() doesn't crash.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index cd1ed49..4cabf43 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -2958,8 +2958,11 @@ class TestInvalidHandle(unittest.TestCase): @unittest.skipIf(WIN32, "skipped on Windows") def test_invalid_handles(self): conn = multiprocessing.connection.Connection(44977608) + # check that poll() doesn't crash try: - self.assertRaises((ValueError, OSError), conn.poll) + conn.poll() + except (ValueError, OSError): + pass finally: # Hack private attribute _handle to avoid printing an error # in conn.__del__ |