https://github.com/python/cpython/commit/92c168707412b48abb497e5e1dccc8c4d04298d5
commit: 92c168707412b48abb497e5e1dccc8c4d04298d5
branch: 3.12
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: freakboy3742 <russ...@keith-magee.com>
date: 2024-06-15T08:32:28+08:00
summary:

[3.12] gh-119819: Conditional skip of logging tests that require 
multiprocessing subprocess support (GH-120476) (#120532)

gh-119819: Conditional skip of logging tests that require multiprocessing 
subprocess support (GH-120476)

Skip tests that require multiprocessing subprocess support.
(cherry picked from commit 92f6d400f76b6a04dddd944568870f689c8fab5f)

Co-authored-by: Russell Keith-Magee <russ...@keith-magee.com>

files:
M Lib/test/test_logging.py

diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 6dd1b6f8047020..a51f60a0b18e3e 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -3866,6 +3866,7 @@ def do_queuehandler_configuration(self, qspec, lspec):
                 self.addCleanup(os.remove, fn)
 
     @threading_helper.requires_working_threading()
+    @support.requires_subprocess()
     def test_config_queue_handler(self):
         q = CustomQueue()
         dq = {
@@ -3894,12 +3895,10 @@ def test_config_queue_handler(self):
             msg = str(ctx.exception)
             self.assertEqual(msg, "Unable to configure handler 'ah'")
 
+    @support.requires_subprocess()
     def test_multiprocessing_queues(self):
         # See gh-119819
 
-        # will skip test if it's not available
-        import_helper.import_module('_multiprocessing')
-
         cd = copy.deepcopy(self.config_queue_handler)
         from multiprocessing import Queue as MQ, Manager as MM
         q1 = MQ()  # this can't be pickled

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to