Skip to content

Commit

Permalink
Skip graphviz tests if not installed locally
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Paine <[email protected]>
  • Loading branch information
timkpaine committed Feb 6, 2024
1 parent 963d35e commit 943cba6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions csp/tests/test_showgraph.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
import pytest

import csp
from csp.showgraph import _build_graphviz_graph


def _cant_find_graphviz():
try:
from graphviz import Digraph

Digraph().pipe()
except BaseException:
return True
return False


@pytest.mark.skipif(_cant_find_graphviz(), reason="cannot find graphviz installation")
def test_showgraph_names():
# Simple test to assert that node names
# are properly propagated into graph viewer
Expand Down

0 comments on commit 943cba6

Please sign in to comment.