Skip to content

Commit

Permalink
add locus tag increment parameter tests #279
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Sep 25, 2024
1 parent 650eedc commit a7b3cfd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,48 @@ def test_locustag_compliant_ok(parameters, tmpdir):
assert proc.returncode == 0


@pytest.mark.parametrize(
'parameters',
[
(['--locus-tag-increment']), # not provided
(['--locus-tag-increment', '']), # empty
(['--locus-tag-increment', ' ']), # whitespace only
(['--locus-tag-increment', 'A']), # wrong characters
(['--locus-tag-increment', 'a']), # wrong characters
(['--locus-tag-increment', '0']), # wrong number
(['--locus-tag-increment', '11']), # wrong number
]
)
def test_locustag_increment_failiing(parameters, tmpdir):
# test locus-tag increment arguments
proc = run(
['bin/bakta', '--db', 'test/db', '--output', tmpdir, '--force', '--skip-plot'] +
parameters +
SKIP_PARAMETERS +
['test/data/NC_002127.1.fna']
)
assert proc.returncode != 0


@pytest.mark.parametrize(
'parameters',
[
(['--locus-tag-increment', '1']),
(['--locus-tag-increment', '5']),
(['--locus-tag-increment', '10'])
]
)
def test_locustag_increment_ok(parameters, tmpdir):
# test locus-tag increment arguments
proc = run(
['bin/bakta', '--db', 'test/db', '--output', tmpdir, '--force', '--skip-plot'] +
parameters +
SKIP_PARAMETERS +
['test/data/NC_002127.1.fna']
)
assert proc.returncode == 0


@pytest.mark.parametrize(
'parameters',
[
Expand Down

0 comments on commit a7b3cfd

Please sign in to comment.