Skip to content

Commit

Permalink
Add test for align tool get_version() class method
Browse files Browse the repository at this point in the history
  • Loading branch information
moshi4 committed Jan 11, 2025
1 parent 674097d commit ba5d867
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/align/tool/test_blast.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest

from pygenomeviz.align import Blast
from pygenomeviz.const import UNKNOWN_VERSION
from tests.marker import skipif_blast_not_installed


Expand All @@ -18,6 +19,12 @@ def test_blast_get_binary_names():
assert Blast.get_binary_names() == ["makeblastdb", "blastn", "tblastx"]


@skipif_blast_not_installed
def test_blast_get_version():
"""Test `get_version()`"""
assert Blast.get_version() != UNKNOWN_VERSION


@skipif_blast_not_installed
@pytest.mark.parametrize(
("seqtype"),
Expand Down
7 changes: 7 additions & 0 deletions tests/align/tool/test_last.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

from pygenomeviz.align import Last
from pygenomeviz.const import UNKNOWN_VERSION
from tests.marker import skipif_last_not_installed


Expand All @@ -16,6 +17,12 @@ def test_last_get_binary_name():
assert Last.get_binary_names() == ["lastdb", "lastal", "last-split", "maf-convert"]


@skipif_last_not_installed
def test_last_get_version():
"""Test `get_version()`"""
assert Last.get_version() != UNKNOWN_VERSION


@skipif_last_not_installed
def test_last_api_genbank(
gbk_dataset_files: list[Path],
Expand Down
7 changes: 7 additions & 0 deletions tests/align/tool/test_mmseqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

from pygenomeviz.align import MMseqs
from pygenomeviz.const import UNKNOWN_VERSION
from tests.marker import skipif_mmseqs_not_installed


Expand All @@ -16,6 +17,12 @@ def test_mmseqs_get_binary_names():
assert MMseqs.get_binary_names() == ["mmseqs"]


@skipif_mmseqs_not_installed
def test_mmseqs_get_version():
"""Test `get_version()`"""
assert MMseqs.get_version() != UNKNOWN_VERSION


@skipif_mmseqs_not_installed
def test_mmseqs_api(gbk_dataset_files: list[Path], tmp_path: Path):
"""Run mmseqs easy-rbh"""
Expand Down
7 changes: 7 additions & 0 deletions tests/align/tool/test_mummer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest

from pygenomeviz.align import MUMmer
from pygenomeviz.const import UNKNOWN_VERSION
from tests.marker import skipif_mummer_not_installed


Expand All @@ -23,6 +24,12 @@ def test_mummer_get_binary_names():
]


@skipif_mummer_not_installed
def test_mummer_get_version():
"""Test `get_version()`"""
assert MUMmer.get_version() != UNKNOWN_VERSION


@skipif_mummer_not_installed
@pytest.mark.parametrize(
("seqtype"),
Expand Down
7 changes: 7 additions & 0 deletions tests/align/tool/test_pmauve.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

from pygenomeviz.align import ProgressiveMauve
from pygenomeviz.const import UNKNOWN_VERSION
from tests.marker import skipif_pmauve_not_installed


Expand All @@ -16,6 +17,12 @@ def test_pmauve_get_binary_names():
assert ProgressiveMauve.get_binary_names() == ["progressiveMauve"]


@skipif_pmauve_not_installed
def test_pmauve_get_version():
"""Test `get_version()`"""
assert ProgressiveMauve.get_version() == UNKNOWN_VERSION


@skipif_pmauve_not_installed
def test_pmauve_api_genbank(gbk_dataset_files: list[Path], tmp_path: Path):
"""Run progressiveMauve with genbank files"""
Expand Down

0 comments on commit ba5d867

Please sign in to comment.