Skip to content

Commit

Permalink
add pytest.importorskip("matplotlib") to all test_draw_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jul 4, 2024
1 parent c0bed9e commit 4a1d1ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/core/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ def test_graph():


def test_draw_graph():
pytest.importorskip("matplotlib")

from jobflow import Flow, JobOrder

# test unconnected graph
Expand Down Expand Up @@ -385,6 +387,8 @@ def test_draw_graph():

@pytest.mark.usefixtures("no_pydot")
def test_draw_graph_nopydot():
pytest.importorskip("matplotlib")

from jobflow import Flow, JobOrder

# test unconnected graph
Expand Down
4 changes: 4 additions & 0 deletions tests/utils/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def test_itergraph():


def test_draw_graph():
pytest.importorskip("matplotlib")

from networkx import DiGraph, planar_layout

from jobflow.utils.graph import draw_graph
Expand All @@ -45,6 +47,8 @@ def test_draw_graph():

@pytest.mark.usefixtures("no_pydot")
def test_draw_graph_no_pydot():
pytest.importorskip("matplotlib")

from networkx import DiGraph

from jobflow.utils.graph import draw_graph
Expand Down

0 comments on commit 4a1d1ec

Please sign in to comment.