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

Add a test for progress bar #2150

Merged
merged 5 commits into from Apr 12, 2023
Merged

Add a test for progress bar #2150

merged 5 commits into from Apr 12, 2023

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Apr 11, 2023

Description

Related issues or PRs
Fix the issue #2148 for master.
Replace #2127

@coveralls
Copy link

coveralls commented Apr 11, 2023

Coverage Status

Coverage: 75.592% (+0.3%) from 75.317% when pulling 041441c on Ericgig:misc.progressbar into df08d96 on qutip:master.

Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

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

Thanks for sorting this out.

All the calls to construct progress bar should move to where .start() was originally. I would also prefer if the tests where a bit more explicit about what they were testing. Having tests decide what to test based on the code is a bad idea, because the code can easily be wrong (e.g. we might forget to add something to the list of progress bars) and it's good to have a pattern of "if the code is changed, the tests should change too".

qutip/ipynbtools.py Outdated Show resolved Hide resolved
qutip/solve/pdpsolve.py Show resolved Hide resolved
bar = progress_bars[pbar](N)
except ImportError:
# ipython or tqdm could be missing
pytest.skip(reason="module not available")
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably list the progress bars explicitly and mark which ones to skip. Otherwise this will skip tests if something fails to import and it might take a long time to realize.

@Ericgig Ericgig merged commit eb06fc4 into qutip:master Apr 12, 2023
12 checks passed
@Ericgig Ericgig deleted the misc.progressbar branch April 12, 2023 22:51
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 this pull request may close these issues.

None yet

3 participants