MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_workers

Method test_workers

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

Source from the content-addressed store, hash-verified

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