]> granicus.if.org Git - python/commitdiff
Prevent dangling threads/process warning for test_multiprocessing.
authorRichard Oudkerk <shibturn@gmail.com>
Fri, 19 Jul 2013 21:53:42 +0000 (22:53 +0100)
committerRichard Oudkerk <shibturn@gmail.com>
Fri, 19 Jul 2013 21:53:42 +0000 (22:53 +0100)
Lib/test/test_multiprocessing.py

index 17abadebef66745428754d235376ae40717aa45c..aa985e30bb084b6df8171a0e411498cf7a4024cd 100644 (file)
@@ -3561,14 +3561,17 @@ def setUpModule():
         try:
             lock = multiprocessing.RLock()
         except OSError:
-            raise unittest.SkipTest("OSError raises on RLock creation, see issue 3111!")
-
+            raise unittest.SkipTest("OSError raises on RLock creation, "
+                                    "see issue 3111!")
     check_enough_semaphores()
-
     util.get_temp_dir()     # creates temp directory for use by all processes
-
     multiprocessing.get_logger().setLevel(LOG_LEVEL)
 
 
+def tearDownModule():
+    # pause a bit so we don't get warning about dangling threads/processes
+    time.sleep(0.5)
+
+
 if __name__ == '__main__':
     unittest.main()