-
Notifications
You must be signed in to change notification settings - Fork 224
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
How to resolve flaky tests resulting from using a single GMT session #1242
Comments
Ok, the flakiness appears to have been an upstream GMT issue that was fixed in GenericMappingTools/gmt#3344. There are some tests that are wrong but currently passing (i.e. false positives) identified in #1217 (comment) and #1217 (comment) that need to be updated once we bump to GMT 6.2.0rc2.
|
The past few flaky tests revealing GMT bugs have convinced me of the usefulness of the current structure, even though it would be nice to have the option to run tests in parallel. |
We seem to be semi-regularly getting failures on windows-latest - Python 3.7 / NumPy 1.18 with : |
Yes this has been popping up recently, but I don't think this is related to flakiness in a single GMT session since the error is |
https://forum.generic-mapping-tools.org/t/memory-temporary-storage-issues/5256 This post is a good example showing that using a single GMT session sometimes causes issues. |
Description of the problem
There's been instances of flaky tests in PyGMT's test suite reported in #1217 (comment). This likely stems from the fact that PyGMT uses a single GMT session (initiated during
import pygmt
) instead of separate GMT sessions for each figure (see #327 (comment)).@meghanrjones asked about whether we should stick with using a single GMT session in #1217 (comment), or use independent sessions per figure
Full code that generated the error
Flaky tests are hard to reproduce (that is their definition actually), but in PyGMT's case, can be found e.g. when a single test passing on
pytest pygmt/tests/test_somemodule.py
fails when ran usingmake test
, or vice versa.E.g. as reported by @meghanrjones in #1217 (comment)
Related issues affected by having a single GMT session:
System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
:The text was updated successfully, but these errors were encountered: