From 328ad0be52239fa867a112b47c52539d2a627dd5 Mon Sep 17 00:00:00 2001 From: gbouras13 Date: Tue, 23 Jul 2024 13:23:53 +0930 Subject: [PATCH] add and fix tests --- tests/test_data/overall_inputs/PP04977_pilon_subset.fasta | 4 ++++ tests/test_dnaapler.py | 7 ++++++- tests/test_overall.py | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/test_data/overall_inputs/PP04977_pilon_subset.fasta diff --git a/tests/test_data/overall_inputs/PP04977_pilon_subset.fasta b/tests/test_data/overall_inputs/PP04977_pilon_subset.fasta new file mode 100644 index 0000000..6e18e03 --- /dev/null +++ b/tests/test_data/overall_inputs/PP04977_pilon_subset.fasta @@ -0,0 +1,4 @@ +>NODE_3970_ +GCTCCGCACCTCGTGCAGCACCGAATGCGCCATTGGCTGCGGCGGCTTCGCAAGCGATGGCGGCGAGCCAGCCTGTGAAT +CAGACACCTGCACCTGCTCAAGTGGCTACTCCTGCGCCCGTACAGCCATTACAGGTTAACGACGAGCCCTCTCGCGATAG +CTTTGATCCAATGGCTGGTGCGAGTTCTCAACAAGCGCCTGCCCGTGCCGAGCAGCGTACAGTCCAGGTAG \ No newline at end of file diff --git a/tests/test_dnaapler.py b/tests/test_dnaapler.py index 02b0cab..61edbae 100755 --- a/tests/test_dnaapler.py +++ b/tests/test_dnaapler.py @@ -206,7 +206,12 @@ def test_begin_dnaapler(self): threads = str(8) gene = "terL" outdir = os.path.join(test_data, "bad_dir") - begin_dnaapler(input, outdir, threads, gene) + params = { + "--input": input, + "--output": outdir, + "--threads": threads, + } + begin_dnaapler(input, outdir, threads, gene, params) def test_end_dnaapler(self): time = 2324.0 diff --git a/tests/test_overall.py b/tests/test_overall.py index 582adb0..8751f58 100755 --- a/tests/test_overall.py +++ b/tests/test_overall.py @@ -210,6 +210,11 @@ def test_custom(tmp_dir): cmd = f"dnaapler all -i {input_fasta} -o {tmp_dir} -t 1 -f -c {custom}" exec_command(cmd) +def test_no_overlap(tmp_dir): + """test no overlap""" + input_fasta: Path = f"{overall_test_data}/PP04977_pilon_subset.fasta" + cmd = f"dnaapler all -i {input_fasta} -o {tmp_dir} -t 1 -f" + exec_command(cmd) def test_all_dnaa_repa(tmp_dir): """test all dnaa repa"""