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, '')
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)
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)
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, '')
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, "")
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, '')
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, '')
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)
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")
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')
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, '')
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')
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, '')