本文整理汇总了Python中test.script_helper.compile_script函数的典型用法代码示例。如果您正苦于以下问题:Python compile_script函数的具体用法?Python compile_script怎么用?Python compile_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了compile_script函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_zipfile_compiled
def test_zipfile_compiled(self):
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = compile_script(script_name)
zip_name, fname = make_zip_script(script_dir, 'test_zip', compiled_name)
self._check_script(zip_name, "<run_path>", fname, zip_name, '')
开发者ID:mozillazg,项目名称:pypy,代码行数:7,代码来源:test_runpy.py
示例2: test_directory_compiled
def test_directory_compiled(self):
with temp_dir() as script_dir:
mod_name = "__main__"
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(script_dir, "<run_path>", compiled_name, script_dir, "")
开发者ID:lzjun567,项目名称:python2.7,代码行数:7,代码来源:test_runpy.py
示例3: test_script_compiled
def test_script_compiled(self):
with temp_dir() as script_dir:
mod_name = "script"
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(compiled_name, "<run_path>", compiled_name, compiled_name, None)
开发者ID:lzjun567,项目名称:python2.7,代码行数:7,代码来源:test_runpy.py
示例4: test_directory_compiled
def test_directory_compiled(self):
if test.test_support.check_impl_detail(pypy=True):
raise unittest.SkipTest("pypy won't load lone .pyc files")
with temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(script_dir, compiled_name, script_dir, '')
开发者ID:ArneBab,项目名称:pypyjs,代码行数:8,代码来源:test_cmd_line_script.py
示例5: test_package_compiled
def test_package_compiled(self):
with temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, "test_pkg")
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, "__main__")
compiled_name = compile_script(script_name)
os.remove(script_name)
launch_name = _make_launch_script(script_dir, "launch", "test_pkg")
self._check_script(launch_name, compiled_name, compiled_name, "test_pkg")
开发者ID:hsienchieh,项目名称:uefilab,代码行数:9,代码来源:test_cmd_line_script.py
示例6: test_directory_compiled
def test_directory_compiled(self):
if no_lone_pyc_file:
return
with temp_dir() as script_dir:
mod_name = '__main__'
script_name = self._make_test_script(script_dir, mod_name)
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(script_dir, "<run_path>", compiled_name,
script_dir, '')
开发者ID:mozillazg,项目名称:pypy,代码行数:10,代码来源:test_runpy.py
示例7: test_package_compiled
def test_package_compiled(self):
if test.test_support.check_impl_detail(pypy=True):
raise unittest.SkipTest("pypy won't load lone .pyc files")
with temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, '__main__')
compiled_name = compile_script(script_name)
os.remove(script_name)
launch_name = _make_launch_script(script_dir, 'launch', 'test_pkg')
self._check_script(launch_name, compiled_name,
compiled_name, 'test_pkg')
开发者ID:ArneBab,项目名称:pypyjs,代码行数:12,代码来源:test_cmd_line_script.py
示例8: test_zipfile_compiled
def test_zipfile_compiled(self):
with temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
compiled_name = compile_script(script_name)
zip_name, run_name = make_zip_script(script_dir, 'test_zip', compiled_name)
self._check_script(zip_name, run_name, zip_name, '')
开发者ID:EnviroCentre,项目名称:jython-upgrade,代码行数:6,代码来源:test_cmd_line_script.py
示例9: test_directory_compiled
def test_directory_compiled(self):
with temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(script_dir, compiled_name, script_dir, '')
开发者ID:EnviroCentre,项目名称:jython-upgrade,代码行数:6,代码来源:test_cmd_line_script.py
示例10: test_script_compiled
def test_script_compiled(self):
with temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
compiled_name = compile_script(script_name)
os.remove(script_name)
self._check_script(compiled_name, compiled_name, compiled_name, None)
开发者ID:EnviroCentre,项目名称:jython-upgrade,代码行数:6,代码来源:test_cmd_line_script.py
注:本文中的test.script_helper.compile_script函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论