[Python-checkins] r64375 - python/trunk/Lib/test/test_multiprocessing.py

jesse.noller python-checkins at python.org
Wed Jun 18 15:29:52 CEST 2008


Author: jesse.noller
Date: Wed Jun 18 15:29:52 2008
New Revision: 64375

Log:
Attempt RLock creation prior to test execution on Linux, if it raises the OSError in issue 3111, skip the test suite

Modified:
   python/trunk/Lib/test/test_multiprocessing.py

Modified: python/trunk/Lib/test/test_multiprocessing.py
==============================================================================
--- python/trunk/Lib/test/test_multiprocessing.py	(original)
+++ python/trunk/Lib/test/test_multiprocessing.py	Wed Jun 18 15:29:52 2008
@@ -1755,9 +1755,12 @@
 #
 
 def test_main(run=None):
-    if sys.platform.startswith("linux") and not os.path.exists("/dev/shm"):
-        from test.test_support import TestSkipped
-        raise TestSkipped("Missing required /dev/shm device on Linux!")
+    if sys.platform.startswith("linux"):
+        try:
+            lock = multiprocessing.RLock()
+        except OSError:
+            from test.test_support import TestSkipped
+            raise TestSkipped("OSError raises on RLock creation, see issue 3111!")
 
     if run is None:
         from test.test_support import run_unittest as run


More information about the Python-checkins mailing list