Skip to content

TST, MAINT: explict graphviz check for test_pydot - #8702

Merged
amcandio merged 2 commits into
networkx:mainfrom
rossbar:pydot-explict-graphviz-check-for-testing
Jun 13, 2026
Merged

amcandio merged 2 commits into
networkx:mainfrom
rossbar:pydot-explict-graphviz-check-for-testing

Conversation

@rossbar

@rossbar rossbar commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This PR proposes to move the pydot-depends-on-graphviz from an implicit install-time check (i.e. the result of pydot being grouped together with pygraphviz in the extra dependencies) to a test-time check with finer granularity for test-skipping.

This configuration change is in preparation for pygraphviz 2.0, which removes the build-time graphviz dependency. With pygraphviz 2.0, it is possible to install & run pygraphviz without any graphviz installed; however, pydot still requires graphviz to be installed specifically for executing layouts/drawing.

This PR is a solution to the issue identified over in gh-8694.

Comment on lines +15 to +19
try:
subprocess.check_output("dot -V".split())
has_graphviz = True
except FileNotFoundError:
has_graphviz = False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amcandio
amcandio merged commit 0672a25 into networkx:main Jun 13, 2026
42 checks passed
@dschult dschult added this to the 3.7 milestone Jun 13, 2026
@rossbar rossbar mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants