don't use pg.plot() in tests#2625
Merged
j9ac9k merged 3 commits intopyqtgraph:masterfrom Feb 26, 2023
Merged
Conversation
a global reference is kept to all PlotWidgets created by pg.plot()
we are testing ImageItem, not ImageView; and furthermore pg.image()
creates a global reference.
some additional fixes:
1) set lower bound of xRange from "-5+25" to "-5e+25"
- in practice, it doesn't matter. because we just need xRange
to be very large.
- furthermore, ImageView sets the aspect to be locked, so it
would have been adjusted to follow yRange anyway
2) reduce the qWait time
- follow what the other tests do and wait for window exposed
a global reference is created by pg.image()
Member
|
Thanks @pijyoi for this PR, always love it when another cause for segfaults in CI is removed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There seems to be a new recurring CI segfault on macOS / Python 3.8 / PySide2 5.15.
This PR seems to help to prevent it from happening.
pg.plot()andpg.image()will keep a permanent global reference to their createdPlotWidgetandImageView.This may be a convenience for interactive use, but not suitable for CI where a great many plots are instantiated.