forked from Andre-Tan/EmMAIL
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
Test the command line intereface | ||
""" | ||
|
||
from click.testing import CliRunner | ||
from emmtyper.bin.run_emmtyper import main | ||
from emmtyper import __version__ as version | ||
|
||
from tests.data import test_sequence_path | ||
|
||
|
||
runner = CliRunner() | ||
|
||
|
||
def test_run_emmtyper_version(): | ||
""" | ||
Test emmtyper --version flag | ||
""" | ||
result = runner.invoke(main, ["--version"]) | ||
assert result.exit_code == 0 | ||
assert result.output == f"emmtyper v{version}\n" | ||
|
||
|
||
def test_run_emmtyper_basic_blast(): | ||
""" | ||
Test basic blast workflow | ||
""" | ||
result = runner.invoke(main, [test_sequence_path]) | ||
assert result.exit_code == 0 | ||
assert result.output == "contig.tmp\t1\tEMM1.0\t\tA-C3\n" | ||
|
||
|
||
def test_run_emmtyper_basic_ispcr(): | ||
""" | ||
Test basic ispcr workflow | ||
""" | ||
result = runner.invoke(main, ["-w", "pcr", test_sequence_path]) | ||
assert result.exit_code == 0 | ||
assert result.output == "contig_pcr.tmp\t1\tEMM1.0\t\tA-C3\n" |