Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
 def teardown_method(self, method):
     self.manager.cleanup()
     utils.remove_dir(self.temp_folder)
Exemplo n.º 6
0
 def teardown_method(self, method):
     utils.remove_dir(self.temp_folder)
Exemplo n.º 7
0
 def teardown_method(self, method):
     utils.remove_dir(self.temp_folder)