From d86ef05a02e820adfd1e3a11cd56d3444d9aa2c9 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Wed, 22 Apr 2015 09:39:19 +0300 Subject: Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist. Patch by Claudiu Popa. --- Lib/test/test_compileall.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Lib/test/test_compileall.py') diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index 07756f6874..2053304e6b 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -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 -- cgit v1.2.1