Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #5
0
 def teardown_method(self, method):
     self.manager.cleanup()
     utils.remove_dir(self.temp_folder)
Exemple #6
0
 def teardown_method(self, method):
     utils.remove_dir(self.temp_folder)
Exemple #7
0
 def teardown_method(self, method):
     utils.remove_dir(self.temp_folder)