mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
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:
parent
c40b5b97fd
commit
4827968af8
6 changed files with 16 additions and 21 deletions
|
|
@ -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'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue