summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-03-30 16:11:16 (GMT)
committerJesse Noller <jnoller@gmail.com>2009-03-30 16:11:16 (GMT)
commite6bab480acb17ba62d948f22a29cdd08289e7986 (patch)
treebf5ce0dccc380506d18d30b989172987f192fd86 /Lib/test
parent783fa44f2cba927dd7c1e2b03866a01a5dd82990 (diff)
downloadcpython-e6bab480acb17ba62d948f22a29cdd08289e7986.zip
cpython-e6bab480acb17ba62d948f22a29cdd08289e7986.tar.gz
cpython-e6bab480acb17ba62d948f22a29cdd08289e7986.tar.bz2
Merge 68768 to maint
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_multiprocessing.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 2daff7e..d4ce4fa 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -61,6 +61,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
#
@@ -1682,6 +1684,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
#
@@ -1785,7 +1799,7 @@ class OtherTest(unittest.TestCase):
multiprocessing.connection.answer_challenge,
_FakeConnection(), b'abc')
-testcases_other = [OtherTest]
+testcases_other = [OtherTest, TestInvalidHandle]
#
#