8000 [issue-558] add test for optional feature to GitHub Action · spdx/tools-python@05c0dfb · GitHub
[go: up one dir, main page]

Skip to content

Commit 05c0dfb

Browse files
committed
[issue-558] add test for optional feature to GitHub Action
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
1 parent 91bb744 commit 05c0dfb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/install_and_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,8 @@ jobs:
3333
run: pytest
3434
- name: Run CLI
3535
run: pyspdxtools -i ./tests/spdx/data/formats/SPDXJSONExample-v2.3.spdx.json
36+
37+
- name: Install optional dependencies
38+
run: python -m pip install networkx
39+
- name: Run tests for graph generation
40+
run: pytest tests/spdx/test_graph_generation.py

tests/spdx/test_graph_generation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
try:
1717
import networkx # noqa: F401
18-
import pygraphviz # noqa: F401
1918
except ImportError:
2019
pytest.skip("Skip this module as the tests need optional dependencies to run.", allow_module_level=True)
2120

@@ -44,7 +43,7 @@
4443
(
4544
"SPDXRdfExample-v2.2.spdx.rdf.xml",
4645
20,
47-
17,
46+
19,
4847
["SPDXRef-Package_DYNAMIC_LINK", "SPDXRef-JenaLib_CONTAINS"],
4948
),
5049
(

0 commit comments

Comments
 (0)
0