Skip to content

Commit b7de435

Browse files
freakboy3742noahbkim
authored andcommitted
pythongh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (python#120476)
Skip tests that require multiprocessing subprocess support.
1 parent 68cde46 commit b7de435

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_logging.py

+2-3
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)