gh-71052: Enable test_concurrent_futures on platforms that lack multiprocessing (gh-115917)

Enable test_concurrent_futures on platforms that support threading but not multiprocessing.
This commit is contained in:
Malcolm Smith 2024-02-25 19:38:18 +00:00 committed by GitHub
parent c40b5b97fd
commit 4827968af8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 21 deletions

View file

@ -5,6 +5,8 @@ import time
import unittest
import sys
from concurrent.futures._base import BrokenExecutor
from concurrent.futures.process import _check_system_limits
from logging.handlers import QueueHandler
from test import support
@ -117,6 +119,11 @@ class FailingInitializerResourcesTest(unittest.TestCase):
"""
def _test(self, test_class):
try:
_check_system_limits()
except NotImplementedError:
self.skipTest("ProcessPoolExecutor unavailable on this system")
runner = unittest.TextTestRunner()
runner.run(test_class('test_initializer'))