Skip to content

Commit

Permalink
Make it possible to run with more samples
Browse files Browse the repository at this point in the history
  • Loading branch information
finngl committed Nov 22, 2023
1 parent 3e7fa76 commit 08302b8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tests/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,18 @@ def test_pipeline(self):
os.makedirs(self.test_dir)
input_dir = pathlib.Path(self.bifrost_install_dir, 'bifrost', 'test_data', 'samples')
assert(input_dir.exists())
file_number = 0
child: pathlib.Path
for child in input_dir.iterdir():
if child.is_file() and child.name.endswith('.fasta'):
file_number += 1
assert(file_number == 1)
test_args = ["--sample_name", "SRR2094561", "--outdir", self.test_dir]
launcher.main(args=test_args)
assert (
os.path.exists(f"{self.test_dir}/{self.component_name}/datadump_complete")
== True
)
shutil.rmtree(self.test_dir)
assert not os.path.isdir(f"{self.test_dir}/{self.component_name}")
filename_arg = child.name[:-6]
test_args = ["--sample_name", filename_arg, "--outdir", self.test_dir]
launcher.main(args=test_args)
assert (
os.path.exists(f"{self.test_dir}/{self.component_name}/datadump_complete")
== True
)
shutil.rmtree(self.test_dir)
assert not os.path.isdir(f"{self.test_dir}/{self.component_name}")

def test_db_output(self):
with pymongo.MongoClient(os.environ["BIFROST_DB_KEY"]) as client:
Expand Down

0 comments on commit 08302b8

Please sign in to comment.