def setUp(self): test_name = self.id().split(".")[-1] SCF.clearConfig() self.test_working_directory = os.path.join(self.iota2_tests_directory, test_name) self.test_working_directory_tmp = os.path.join( self.iota2_tests_directory, "FEATURES") if not os.path.exists(self.test_working_directory): os.mkdir(self.test_working_directory) if not os.path.exists(self.test_working_directory_tmp): os.mkdir(self.test_working_directory_tmp)
def setUp(self): """ create test environement (directories) """ #clear configuration object SCF.clearConfig() #create directories test_name = self.id().split(".")[-1] self.test_working_directory = os.path.join(self.iota2_tests_directory, test_name) self.test_working_directory_tmp = os.path.join( self.iota2_tests_directory, test_name + "_TMP") if os.path.exists(self.test_working_directory): shutil.rmtree(self.test_working_directory) if not os.path.exists(self.test_working_directory_tmp): os.mkdir(self.test_working_directory_tmp) self.config_path_test = os.path.join(self.test_working_directory_tmp, test_name + ".cfg") shutil.copy(self.config_path, self.config_path_test)