From fa2cd7cab39ce465dd16b0b49d5d4883c067ec0a Mon Sep 17 00:00:00 2001 From: Oliver Schwengers Date: Fri, 14 Jan 2022 13:11:28 +0100 Subject: [PATCH] add sliding window parameter tests #24 --- test/test_args.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/test_args.py b/test/test_args.py index d8250a9..ce950f0 100644 --- a/test/test_args.py +++ b/test/test_args.py @@ -86,4 +86,24 @@ def test_cdna_failing(arguments, tmpdir): # test cDNA arguments cmd_line = ['bin/referenceseeker', '--conserved-dna'] + arguments + ['test/db', 'test/data/Salmonella_enterica_CFSAN000189.fasta'] proc = run(cmd_line) + assert proc.returncode != 0 + + +@pytest.mark.parametrize( + 'arguments', + [ + ([]), # not provided + (['']), # empty + (['foo']), # not integer + (['-1']), # smaller than zero + (['0']), # zero + (['1.1']) # float + (['99']), # smaller than min (100) + (['1001']) # larger than max (1000) + ] +) +def test_sliding_window_failing(arguments, tmpdir): + # test sliding_window arguments + cmd_line = ['bin/referenceseeker', '--sliding-window'] + arguments + ['test/db', 'test/data/Salmonella_enterica_CFSAN000189.fasta'] + proc = run(cmd_line) assert proc.returncode != 0 \ No newline at end of file