Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_graphviz / test_image_type fails #811

Open
jlapeyre opened this issue Feb 10, 2023 · 0 comments · May be fixed by #830
Open

test_graphviz / test_image_type fails #811

jlapeyre opened this issue Feb 10, 2023 · 0 comments · May be fixed by #830

Comments

@jlapeyre
Copy link
Collaborator

jlapeyre commented Feb 10, 2023

When running tox -epy exactly one test fails:

def test_image_type(self):
graph = rustworkx.directed_gnp_random_graph(50, 0.8)
image = graphviz_draw(graph, image_type="jpg")
self.assertIsInstance(image, PIL.Image.Image)
_save_image(image, "test_graphviz_draw_image_type.jpg")

Failure occurs already on line 122.
Running a script with copies of lines 121 and 122 produces the same error

traceback

      File "/home/lapeyre/qiskit/rustworkx/tests/rustworkx_tests/visualization/test_graphviz.py", line 122, in test_image_type
    image = graphviz_draw(graph, image_type="jpg")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      File "/home/lapeyre/qiskit/rustworkx/.tox/py/lib64/python3.11/site-packages/rustworkx/visualization/graphviz.py", line 187, in graphviz_draw
    dot_result = subprocess.run(
                 ^^^^^^^^^^^^^^^

      File "/usr/lib64/python3.11/subprocess.py", line 569, in run
    raise CalledProcessError(retcode, process.args,

    subprocess.CalledProcessError: Command '['dot', '-T', 'jpg']' returned non-zero exit status 1.

versions

rustworkx main Feb 8, 2023 e4170ef
fedora linux
/usr/bin/dot -V => dot - graphviz version 5.0.0 (0)
Python 3.11.0
RETWORKX_TEST_PRESERVE_IMAGES=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant