def self(): # Set up self = Empty() self.s_wd_loc = test_utils.load_solutions_wd() self.working_wd_loc = test_utils.load_test_wd_loc() self.genomes = test_utils.load_test_genomes() logging.shutdown() if os.path.isdir(self.working_wd_loc): shutil.rmtree(self.working_wd_loc, ignore_errors=True) os.mkdir(self.working_wd_loc) shutil.copytree(os.path.join(self.s_wd_loc, 'data'), \ os.path.join(self.working_wd_loc, 'data')) shutil.rmtree(os.path.join(self.working_wd_loc, 'data', 'Clustering_files')) importlib.reload(logging) yield self # Teardown logging.shutdown() if os.path.isdir(self.working_wd_loc): shutil.rmtree(self.working_wd_loc, ignore_errors=True)
def self(): # Set up self = Empty() self.genomes = test_utils.load_test_genomes() self.broken_genome = test_utils.load_broken_genome() self.wd_loc = test_utils.load_test_wd_loc() self.test_dir = test_utils.load_random_test_dir() self.s_wd_loc = test_utils.load_solutions_wd() if os.path.isdir(self.test_dir): shutil.rmtree(self.test_dir) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc, ignore_errors=True) if not os.path.isdir(self.test_dir): os.mkdir(self.test_dir) importlib.reload(logging) yield self # Teardown logging.shutdown() if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) if os.path.isdir(self.test_dir): shutil.rmtree(self.test_dir)
def self(): # Set up self = Empty() self.genomes = test_utils.load_test_genomes() self.wd_loc = test_utils.load_test_wd_loc() self.s_wd_loc = test_utils.load_solutions_wd() self.testdir = test_utils.load_random_test_dir() importlib.reload(logging) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) yield self # Teardown logging.shutdown() if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc)
def self(caplog): # Set up self = Empty() self._caplog = caplog self.genomes = test_utils.load_test_genomes() self.wd_loc = test_utils.load_test_wd_loc() self.s_wd_loc = test_utils.load_solutions_wd() self.testdir = test_utils.load_random_test_dir() self.stinker_genome = os.path.join(test_utils.load_test_backend(), 'other/Enterococcus_faecalis_TX0104.fa') self.prodigal_loc = os.path.join(test_utils.load_solutions_wd(), 'data/prodigal/') # Teardown importlib.reload(logging) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) yield self
def self(): # Set up self = Empty() self.genomes = test_utils.load_test_genomes() self.wd_loc = test_utils.load_test_wd_loc() self.s_wd_loc = test_utils.load_solutions_wd() self.zipped_genome = test_utils.load_zipped_genome() importlib.reload(logging) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) os.mkdir(self.wd_loc) yield self importlib.reload(logging) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) os.mkdir(self.wd_loc)
def self(): # Set up self = Empty() self.genomes = test_utils.load_test_genomes() self.wd_loc = test_utils.load_test_wd_loc() if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) self.s_wd_loc = test_utils.load_solutions_taxonomy_wd() # copy over the data from solutions directory os.mkdir(self.wd_loc) shutil.copytree(os.path.join(self.s_wd_loc, 'data'), \ os.path.join(self.wd_loc, 'data')) importlib.reload(logging) yield self # Teardown logging.shutdown() if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc)
def self(): # Set up self = Empty() self.genomes = test_utils.load_test_genomes() self.zipped_genomes = test_utils.load_zipped_genomes() self.large_genome_set = test_utils.load_large_genome_set() self.wd_loc = test_utils.load_test_wd_loc() self.wd_loc2 = test_utils.load_test_wd_loc_2() self.s_wd_loc = test_utils.load_solutions_wd() importlib.reload(logging) if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) if os.path.isdir(self.wd_loc2): shutil.rmtree(self.wd_loc2) yield self # Teardown logging.shutdown() if os.path.isdir(self.wd_loc): shutil.rmtree(self.wd_loc) if os.path.isdir(self.wd_loc2): shutil.rmtree(self.wd_loc2)