diff options
Diffstat (limited to 'Lib/test/test_compileall.py')
-rw-r--r-- | Lib/test/test_compileall.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index 38d7b99..2995e08 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -161,7 +161,7 @@ class CompileallTests(unittest.TestCase): self.assertRegex(line, r'Listing ([^WindowsPath|PosixPath].*)') self.assertTrue(os.path.isfile(self.bc_path)) - @mock.patch('compileall.ProcessPoolExecutor') + @mock.patch('concurrent.futures.ProcessPoolExecutor') def test_compile_pool_called(self, pool_mock): compileall.compile_dir(self.directory, quiet=True, workers=5) self.assertTrue(pool_mock.called) @@ -171,19 +171,19 @@ class CompileallTests(unittest.TestCase): "workers must be greater or equal to 0"): compileall.compile_dir(self.directory, workers=-1) - @mock.patch('compileall.ProcessPoolExecutor') + @mock.patch('concurrent.futures.ProcessPoolExecutor') def test_compile_workers_cpu_count(self, pool_mock): compileall.compile_dir(self.directory, quiet=True, workers=0) self.assertEqual(pool_mock.call_args[1]['max_workers'], None) - @mock.patch('compileall.ProcessPoolExecutor') + @mock.patch('concurrent.futures.ProcessPoolExecutor') @mock.patch('compileall.compile_file') def test_compile_one_worker(self, compile_file_mock, pool_mock): compileall.compile_dir(self.directory, quiet=True) self.assertFalse(pool_mock.called) self.assertTrue(compile_file_mock.called) - @mock.patch('compileall.ProcessPoolExecutor', new=None) + @mock.patch('concurrent.futures.ProcessPoolExecutor', new=None) @mock.patch('compileall.compile_file') def test_compile_missing_multiprocessing(self, compile_file_mock): compileall.compile_dir(self.directory, quiet=True, workers=5) |