def prepare_testcase_working_dir(pytest_request): testcase_parameters = pytest_request.getfixturevalue("testcase_parameters") working_directory = testcase_parameters.get_working_dir() if not working_directory.exists(): working_directory.mkdir(parents=True) testcase_file_path = testcase_parameters.get_testcase_file() copy_file(testcase_file_path, working_directory)
def setup(request): testcase_parameters = request.getfixturevalue("testcase_parameters") copy_file(testcase_parameters.get_testcase_file(), testcase_parameters.get_working_dir()) request.addfinalizer(lambda: logger.info("Report file path\n{}\n".format( calculate_report_file_path(testcase_parameters.get_working_dir()))))
def create_decryption_key(self): self.decryption_key = Path(tc_parameters.WORKING_DIR, "decryption.key") copy_file(self.derived_key, self.decryption_key)
def __prepare_testcase_working_dir(self): working_directory = self.__testcase_parameters.get_working_dir() if not working_directory.exists(): working_directory.mkdir(parents=True) testcase_file_path = self.__testcase_parameters.get_testcase_file() copy_file(testcase_file_path, working_directory)
def light_extra_files(target_dir): if "LIGHT_EXTRA_FILES" in os.environ: for f in os.environ["LIGHT_EXTRA_FILES"].split(":"): if Path(f).exists(): copy_file(f, target_dir)