diff options
author | Jesse Noller <jnoller@gmail.com> | 2009-01-19 16:23:53 (GMT) |
---|---|---|
committer | Jesse Noller <jnoller@gmail.com> | 2009-01-19 16:23:53 (GMT) |
commit | 6214edd1bbf8aece44215b6a47fb2be4df73d42e (patch) | |
tree | 29c89e73cfb551883794d0c9922dd566b3864b60 /Lib/test | |
parent | 7aedf11e57bf38e992ebe6c0ae86167ae9b79412 (diff) | |
download | cpython-6214edd1bbf8aece44215b6a47fb2be4df73d42e.zip cpython-6214edd1bbf8aece44215b6a47fb2be4df73d42e.tar.gz cpython-6214edd1bbf8aece44215b6a47fb2be4df73d42e.tar.bz2 |
merge r68768 to py3k
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 4e5d759..9a307de 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -62,6 +62,8 @@ else: HAVE_GETVALUE = not getattr(_multiprocessing, 'HAVE_BROKEN_SEM_GETVALUE', False) +WIN32 = (sys.platform == "win32") + # # Creates a wrapper for a function which records the time it takes to finish # @@ -1683,6 +1685,18 @@ class _TestLogging(BaseTestCase): logger.setLevel(level=LOG_LEVEL) # +# Test to verify handle verification, see issue 3321 +# + +class TestInvalidHandle(unittest.TestCase): + + def test_invalid_handles(self): + if WIN32: + return + conn = _multiprocessing.Connection(44977608) + self.assertRaises(IOError, conn.poll) + self.assertRaises(IOError, _multiprocessing.Connection, -1) +# # Functions used to create test cases from the base ones in this module # @@ -1786,7 +1800,7 @@ class OtherTest(unittest.TestCase): multiprocessing.connection.answer_challenge, _FakeConnection(), b'abc') -testcases_other = [OtherTest] +testcases_other = [OtherTest, TestInvalidHandle] # # |