Skip to content

Make sure the closefigures fixture is defined #5970

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

Merged

Conversation

pavoljuhas
Copy link
Collaborator

Problem: closefigures fixture is defined in the global conftest.py,
which is not included in cirq packages. Package archives thus
contain tests with undefined fixture.

Solution: move closefigures definition to package conftest.py files.

Also add missing import of pyplot for test_calibration_plot_histograms.

`test_calibration_plot_histograms` references matplotlib.pyplot,
but that module is not imported by default.
Problem: closefigures fixture is defined in the global conftest.py,
which is not included in cirq packages.  Package archives thus
contain tests with undefined fixture.

Solution: move closefigures definition to package conftest.py files.
@pavoljuhas pavoljuhas added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Dec 20, 2022
@tanujkhattar tanujkhattar merged commit 3d9492f into quantumlib:master Dec 20, 2022
@pavoljuhas pavoljuhas deleted the move-closefigures-definition branch December 20, 2022 23:13
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Add missing import of matplotlib.pyplot

`test_calibration_plot_histograms` references matplotlib.pyplot,
but that module is not imported by default.

* Fix missing definition of the closefigures fixture

Problem: closefigures fixture is defined in the global conftest.py,
which is not included in cirq packages.  Package archives thus
contain tests with undefined fixture.

Solution: move closefigures definition to package conftest.py files.

* Fix function reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells CirqBot to sync and merge this PR. (If it's running.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants