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