Skip to content

Fix flaky CI tests #26680

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
merged 4 commits into from
Sep 4, 2023
Merged

Fix flaky CI tests #26680

merged 4 commits into from
Sep 4, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 2, 2023

PR summary

I've pulled these out of #24597 as that is taking some time to be merged, and it seems like these are failing more often now. Some of these were also triggered on #26621 (while it had bugs) as well.

PR checklist

@QuLogic QuLogic added topic: testing CI: testing CI configuration and testing labels Sep 2, 2023
@QuLogic QuLogic added this to the v3.8.0 milestone Sep 2, 2023
@QuLogic QuLogic mentioned this pull request Sep 2, 2023
4 tasks
assert x == ',$\\mathdefault{,0{,}5},$'


def test_locale_comma():
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain this song and dance?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's in the commit message:

On some systems/pytest versions, the skip in an exception handler does not skip, but is treated as an exception. Namely, the ARM test machine in Cirrus and on my WSL Ubuntu.

I assume that is a bug somewhere in pytest but the subprocess avoids that. Also, changing the locale is a global modification, and it seems safer to do so in a subprocess, and not have to worry about fixing it up in the main process.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps comment the code as well? This seems an odd thing to do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

On some systems/pytest versions, the skip in an exception handler does
not skip, but is treated as an exception. Namely, the ARM test machine
in Cirrus and on my WSL Ubuntu.
The main parent process is using Agg, so the subprocess should as well,
to be able to unpickle correctly.
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Feel free to self merge in case you want to squash

@story645 story645 merged commit 389a7e8 into matplotlib:main Sep 4, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 4, 2023
ksunden added a commit that referenced this pull request Sep 4, 2023
…680-on-v3.8.x

Backport PR #26680 on branch v3.8.x (Fix flaky CI tests)
@QuLogic QuLogic deleted the fix-ci-tests branch September 5, 2023 20:40
@ksunden ksunden mentioned this pull request Sep 15, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: testing CI configuration and testing topic: testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants