Skip to content

Commit ca1dd4d

Browse files
committed
Run idxml tests only if pyopenms is installed
1 parent c667527 commit ca1dd4d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ jobs:
5858
- name: Install package and its dependencies
5959
run: |
6060
python -m pip install --upgrade pip
61-
pip install .[dev,idxml]
61+
pip install .[dev]
62+
63+
- name: Install optional dependencies that might not be available
64+
continue-on-error: true
65+
run: pip install .[idxml]
6266

6367
- name: Test imports
6468
run: python -c "import psm_utils"

tests/test_io/test_idxml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
import hashlib
44

5+
import pytest
6+
57
from psm_utils.io.idxml import IdXMLReader, IdXMLWriter
68
from psm_utils.io.sage import SageTSVReader
79
from psm_utils.peptidoform import Peptidoform
810
from psm_utils.psm import PSM
911

12+
pyopenms = pytest.importorskip("pyopenms")
13+
1014

1115
class TestIdXMLReader:
1216
def test__parse_peptidoform(self):

0 commit comments

Comments
 (0)