Exemplo n.º 1
0
 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, '')
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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, '')
Exemplo n.º 5
0
 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, '')
Exemplo n.º 6
0
 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, "")
Exemplo n.º 7
0
 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, '')
Exemplo n.º 8
0
 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, '')
Exemplo n.º 9
0
 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, '')
Exemplo n.º 10
0
 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)
Exemplo n.º 11
0
 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")
Exemplo n.º 12
0
 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')
Exemplo n.º 13
0
 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, '')
Exemplo n.º 14
0
 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')
Exemplo n.º 15
0
 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_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_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, '')
 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)
Exemplo n.º 19
0
 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, '')