Skip to content

Commit

Permalink
[3.12] gh-119819: Conditional skip of logging tests that require mult…
Browse files Browse the repository at this point in the history
…iprocessing 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]>
  • Loading branch information
miss-islington and freakboy3742 authored Jun 15, 2024
1 parent d2105a1 commit 92c1687
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 92c1687

Please sign in to comment.