@mock.patch('compileall.compile_dir')
def test_workers_available_cores(self, compile_dir):
    with mock.patch('sys.argv', new=[sys.executable, self.directory, '-j0']):
        compileall.main()
        self.assertTrue(compile_dir.called)
        self.assertEqual(compile_dir.call_args[(- 1)]['workers'], 0)
@mock.patch('compileall.compile_dir')
def test_workers_available_cores(self, compile_dir):
    with mock.patch('sys.argv', new=[sys.executable, self.directory, '-j0']):
        compileall.main()
        self.assertTrue(compile_dir.called)
        self.assertEqual(compile_dir.call_args[(- 1)]['workers'], 0)