From: Charles-François Natali Date: Fri, 6 Sep 2013 19:12:22 +0000 (+0200) Subject: Issue #18934: Relax test_multiprocessing.test_invalid_handles a bit: we just X-Git-Tag: v3.4.0a2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6703bb4984c708132937a94f58c2bae93c6a829b;p=thirdparty%2FPython%2Fcpython.git Issue #18934: Relax test_multiprocessing.test_invalid_handles a bit: we just want to check that Connection.poll() doesn't crash. --- diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index cd1ed498d7a3..4cabf436ae90 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__