unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
359 stars 157 forks source link

Fix global tqdm module patch in test #2319

Closed cosenal closed 5 months ago

cosenal commented 5 months ago

Despite the patch of tqdm happens in a context manager, the fact that the module is reloaded inside the context makes it so that the patch affects all other tests. No test wasn't failing, because there was no assert on tqdm being there, but codecov reports were affected by this, i.e., this PR fixes #2318.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.22%. Comparing base (ccb9ff6) to head (6028daa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2319 +/- ## ========================================== + Coverage 98.19% 98.22% +0.02% ========================================== Files 87 87 Lines 4052 4052 ========================================== + Hits 3979 3980 +1 + Misses 73 72 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cosenal commented 5 months ago

The test (macos-latest, 3.9) build failing is because of https://github.com/actions/setup-python/issues/696