Skip to content

fix: disable plot popups during doctest runs#201

Open
MoHermes wants to merge 1 commit into
devfrom
fix-doctest-plot-popups
Open

fix: disable plot popups during doctest runs#201
MoHermes wants to merge 1 commit into
devfrom
fix-doctest-plot-popups

Conversation

@MoHermes

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added testing bug Something isn't working labels May 28, 2026
@MoHermes MoHermes marked this pull request as ready for review June 5, 2026 08:56
Comment thread tests/test_doc.py
from mpqp.tools.pauli_grouping import CommutingTypes, pauli_grouping_greedy
from mpqp.tools.unitary_decomposition import quantum_shannon_decomposition

matplotlib.use("Agg", force=True)

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.

is the Agg backend needed for ioff ?

Comment thread tests/test_doc.py
matplotlib.use("Agg", force=True)
from matplotlib import pyplot as plt

plt.ioff()

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.

since you monkeypatch show with the nill function, is this even needed ?

Comment thread tests/test_doc.py
else:
assert runner.run(test).failed == 0
finally:
plt.close("all")

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.

same question

@Henri-ColibrITD Henri-ColibrITD left a comment

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.

some questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants