Skip to content

Commit 92c1687

Browse files
[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 92f6d40) Co-authored-by: Russell Keith-Magee <[email protected]>
1 parent d2105a1 commit 92c1687

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
@@ -3866,6 +3866,7 @@ def do_queuehandler_configuration(self, qspec, lspec):
38663866
self.addCleanup(os.remove, fn)
38673867

38683868
@threading_helper.requires_working_threading()
3869+
@support.requires_subprocess()
38693870
def test_config_queue_handler(self):
38703871
q = CustomQueue()
38713872
dq = {
@@ -3894,12 +3895,10 @@ def test_config_queue_handler(self):
38943895
msg = str(ctx.exception)
38953896
self.assertEqual(msg, "Unable to configure handler 'ah'")
38963897

3898+
@support.requires_subprocess()
38973899
def test_multiprocessing_queues(self):
38983900
# See gh-119819
38993901

3900-
# will skip test if it's not available
3901-
import_helper.import_module('_multiprocessing')
3902-
39033902
cd = copy.deepcopy(self.config_queue_handler)
39043903
from multiprocessing import Queue as MQ, Manager as MM
39053904
q1 = MQ() # this can't be pickled

0 commit comments

Comments
 (0)