Skip to content

Commit 076db11

Browse files
committed
Small cleanups based on Serhiy's code review.
1 parent d1fd0dc commit 076db11

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def __call__(self, *args, **kwds):
258258
class BaseTestCase(object):
259259

260260
ALLOWED_TYPES = ('processes', 'manager', 'threads')
261-
# If not empty, limit which start method suits run this class.
261+
# If not empty, limit which start method suites run this class.
262262
START_METHODS: set[str] = set()
263263
start_method = None # set by install_tests_in_module_dict()
264264

@@ -6406,7 +6406,7 @@ def test_atexit(self):
64066406
class _TestSpawnedSysPath(BaseTestCase):
64076407
"""Test that sys.path is setup in forkserver and spawn processes."""
64086408

6409-
ALLOWED_TYPES = ('processes',)
6409+
ALLOWED_TYPES = {'processes'}
64106410
# Not applicable to fork which inherits everything from the process as is.
64116411
START_METHODS = {"forkserver", "spawn"}
64126412

@@ -6422,11 +6422,6 @@ def setUp(self):
64226422
sys.path.insert(0, "") # Replaced with an abspath in child.
64236423
self.assertIn(self.start_method, self.START_METHODS)
64246424
self._ctx = multiprocessing.get_context(self.start_method)
6425-
try:
6426-
self._ctx_forkserver = multiprocessing.get_context("forkserver")
6427-
except ValueError:
6428-
self._ctx_forkserver = None
6429-
self._ctx_spawn = multiprocessing.get_context("spawn")
64306425

64316426
def tearDown(self):
64326427
sys.path[:] = self._orig_sys_path

0 commit comments

Comments
 (0)