Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 13, 2024
1 parent 6d7ac35 commit 9a6a61c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_sourmash_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,23 +848,24 @@ def test_load_one_signature_1(runtmp):
sigfile = utils.get_test_data("63.fa.sig.zip")

ss = sourmash_args.load_one_signature(sigfile, ksize=31)
assert ss.name.startswith('NC_011663.1 ')
assert ss.name.startswith("NC_011663.1 ")


def test_load_one_signature_2_fail(runtmp):
# test the sourmash_args.load_one_signature function on failure - no sig
sigfile = utils.get_test_data("63.fa.sig.zip")

with pytest.raises(ValueError) as exc:
ss = sourmash_args.load_one_signature(sigfile, ksize=21)
sourmash_args.load_one_signature(sigfile, ksize=21)

assert "expected exactly one." in str(exc)


def test_load_one_signature_3_fail(runtmp):
# test the sourmash_args.load_one_signature function on failure - many sigs
sigfile = utils.get_test_data("prot/all.zip")

with pytest.raises(ValueError) as exc:
ss = sourmash_args.load_one_signature(sigfile)
sourmash_args.load_one_signature(sigfile)

assert "more than one signature" in str(exc)

0 comments on commit 9a6a61c

Please sign in to comment.