Skip to content

Commit

Permalink
adding main batch hits
Browse files Browse the repository at this point in the history
  • Loading branch information
CNuge committed Mar 11, 2020
1 parent e31aedf commit 504b0a9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
Binary file modified alfie/tests/__pycache__/test_script.cpython-37-pytest-5.2.1.pyc
Binary file not shown.
Binary file modified alfie/tests/__pycache__/test_seqio.cpython-37-pytest-5.2.1.pyc
Binary file not shown.
37 changes: 37 additions & 0 deletions alfie/tests/test_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ def test_main_with_args():
os.remove("alfie_out/"+x)
os.rmdir("alfie_out")


#batch process a fasta file
sys.argv = ['alfie', "-f", ex_fasta_file, "-b", "20"]
alf.main()

fasta_main_outputs = ['animalia_example_data.fasta',
'bacteria_example_data.fasta',
'fungi_example_data.fasta',
'plantae_example_data.fasta',
'protista_example_data.fasta']

#check outputs were made
assert sorted(os.listdir('alfie_out')) == fasta_main_outputs
#tear down the outputs
for x in fasta_main_outputs:
os.remove("alfie_out/"+x)
os.rmdir("alfie_out")



#process a fastq file
sys.argv = ['alfie', "-f", ex_fastq_file]
alf.main()
Expand All @@ -73,3 +93,20 @@ def test_main_with_args():
for x in fastq_main_outputs:
os.remove("alfie_out/"+x)
os.rmdir("alfie_out")

#batch process a fastq file
sys.argv = ['alfie', "-f", ex_fastq_file, "-b", "20"]
alf.main()

fastq_main_outputs = ['animalia_example_data.fastq',
'bacteria_example_data.fastq',
'fungi_example_data.fastq',
'plantae_example_data.fastq',
'protista_example_data.fastq']

#check for outputs
assert sorted(os.listdir('alfie_out')) == fastq_main_outputs

for x in fastq_main_outputs:
os.remove("alfie_out/"+x)
os.rmdir("alfie_out")

0 comments on commit 504b0a9

Please sign in to comment.