def compiled_loader(): temp_folder = utils.make_tmpdir() # Create a simple package pkg_location = utils.create_working_package(temp_folder, 'compile_test') mod_location = os.path.join(pkg_location, 'app.py') utils.write_file(mod_location, SIMPLE_CLASS) py_compile.compile(mod_location) yield temp_folder utils.remove_dir(temp_folder)
def loader_finder(): temp_folder = utils.make_tmpdir() # Create a simple package pkg_location = utils.create_working_package(temp_folder) mod_location = os.path.join(pkg_location, 'app.py') utils.write_file(mod_location, SIMPLE_CLASS) finder = PikeFinder([temp_folder]) loader = PikeLoader('pike_tests.app', mod_location) yield loader, finder utils.remove_dir(temp_folder)
def teardown_method(self, method): self.manager.cleanup() utils.remove_dir(self.temp_folder)
def teardown_method(self, method): utils.remove_dir(self.temp_folder)