Skip to content

Commit d62ba55

Browse files
committed
Update how we check for graphviz installation
1 parent e3ace78 commit d62ba55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/test/pytest/python_interface/inspection/test_mlir_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""Unit test module for the MLIR graph generation in the Unified Compiler visualization module."""
1515

1616
from pathlib import Path
17-
from subprocess import run
17+
from shutil import which
1818

1919
import pennylane as qml
2020
import pytest
@@ -28,7 +28,7 @@
2828
pytestmark = pytest.mark.xdsl
2929
graphviz = pytest.importorskip("graphviz")
3030

31-
if run(["/usr/bin/which", "dot"], check=False).returncode != 0:
31+
if which("dot") is None:
3232
pytest.skip(reason="Graphviz isn't installed.")
3333

3434

0 commit comments

Comments
 (0)