mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist.
Patch by Claudiu Popa.
This commit is contained in:
parent
c3a7f18100
commit
d86ef05a02
4 changed files with 10 additions and 9 deletions
|
@ -136,10 +136,10 @@ class CompileallTests(unittest.TestCase):
|
|||
self.assertTrue(compile_file_mock.called)
|
||||
|
||||
@mock.patch('compileall.ProcessPoolExecutor', new=None)
|
||||
def test_compile_missing_multiprocessing(self):
|
||||
with self.assertRaisesRegex(NotImplementedError,
|
||||
"multiprocessing support not available"):
|
||||
compileall.compile_dir(self.directory, quiet=True, workers=5)
|
||||
@mock.patch('compileall.compile_file')
|
||||
def test_compile_missing_multiprocessing(self, compile_file_mock):
|
||||
compileall.compile_dir(self.directory, quiet=True, workers=5)
|
||||
self.assertTrue(compile_file_mock.called)
|
||||
|
||||
class EncodingTest(unittest.TestCase):
|
||||
"""Issue 6716: compileall should escape source code when printing errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue