MCPcopy Index your code
hub / github.com/python/cpython / test_workers

Method test_workers

Lib/test/test_compileall.py:859–871  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

857
858 @skipUnless(_have_multiprocessing, "requires multiprocessing")
859 def test_workers(self):
860 bar2fn = script_helper.make_script(self.directory, 'bar2', '')
861 files = []
862 for suffix in range(5):
863 pkgdir = os.path.join(self.directory, 'foo{}'.format(suffix))
864 os.mkdir(pkgdir)
865 fn = script_helper.make_script(pkgdir, '__init__', '')
866 files.append(script_helper.make_script(pkgdir, 'bar2', ''))
867
868 self.assertRunOK(self.directory, '-j', '0')
869 self.assertCompiled(bar2fn)
870 for file in files:
871 self.assertCompiled(file)
872
873 @mock.patch('compileall.compile_dir')
874 def test_workers_available_cores(self, compile_dir):

Callers

nothing calls this directly

Calls 7

assertRunOKMethod · 0.95
assertCompiledMethod · 0.95
make_scriptMethod · 0.45
joinMethod · 0.45
formatMethod · 0.45
mkdirMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected