Skip to content

Commit 3c88898

Browse files
[3.13] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) (#120531)
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 92f6d40) Co-authored-by: Russell Keith-Magee <[email protected]>
1 parent f021f9e commit 3c88898

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_logging.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,6 +3898,7 @@ def do_queuehandler_configuration(self, qspec, lspec):
38983898
self.addCleanup(os.remove, fn)
38993899

39003900
@threading_helper.requires_working_threading()
3901+
@support.requires_subprocess()
39013902
def test_config_queue_handler(self):
39023903
q = CustomQueue()
39033904
dq = {
@@ -3926,12 +3927,10 @@ def test_config_queue_handler(self):
39263927
msg = str(ctx.exception)
39273928
self.assertEqual(msg, "Unable to configure handler 'ah'")
39283929

3930+
@support.requires_subprocess()
39293931
def test_multiprocessing_queues(self):
39303932
# See gh-119819
39313933

3932-
# will skip test if it's not available
3933-
import_helper.import_module('_multiprocessing')
3934-
39353934
cd = copy.deepcopy(self.config_queue_handler)
39363935
from multiprocessing import Queue as MQ, Manager as MM
39373936
q1 = MQ() # this can't be pickled

0 commit comments

Comments
 (0)