8000 Migrate tk backend tests into subprocesses by richardsheridan · Pull Request #18261 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Migrate tk backend tests into subprocesses #18261

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

Conversation

richardsheridan
Copy link
Contributor
@richardsheridan richardsheridan commented Aug 14, 2020

PR Summary

This PR is a first attempt to fix #18246. Try to isolate suspected interactions between tests by using subprocesses liberally. The argument against this might be that subprocess tests are computationally expensive and we might better track down the weird interactions. I'm happy to go with this or try a different idea!

Eagerly making the pull request to engage CI.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

@jklymak
Copy link
Member
jklymak commented Aug 14, 2020

I'll take the liberty of converting to draft until you are done experimenting. Feel free to convert back...

@jklymak jklymak marked this pull request as draft August 14, 2020 19:44
@richardsheridan richardsheridan force-pushed the backend_tk_tests_to_subprocess branch from 9156b85 to 1b3d407 Compare August 14, 2020 22:54
@QuLogic
Copy link
Member
QuLogic commented Aug 15, 2020

It seems to be working; you'll need to rebase to get the docs CI working, and also fix the flake8 issues.

Copy link
Member
@jkseppan jkseppan left a comment

Choose a reason for hiding this comment

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

Looks good to me, flake8 has some complaints.

@richardsheridan richardsheridan marked this pull request as ready for review August 15, 2020 13:51
@jklymak jklymak requested a review from QuLogic August 15, 2020 15:51
Copy link
Member
@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

My only question is why sometimes you check subprocess.TimeoutExpired and sometimes subprocess.CalledProcessError?

@QuLogic
Copy link
Member
QuLogic commented Aug 17, 2020

Also, we prefer rebase over merge.

@richardsheridan richardsheridan force-pushed the backend_tk_tests_to_subprocess branch from fa60aa9 to 030943d Compare August 17, 2020 23:28
@richardsheridan
Copy link
Contributor Author

@QuLogic The timeout checks should be there consistently, since you mention it, but some of the tests are better off to check the content of stdout or stderr before checking the return code. Hopefully the new comments make this clear! Also rebased as requested.

@tacaswell tacaswell added this to the v3.4.0 milestone Aug 17, 2020
@tacaswell tacaswell merged commit ff0391d into matplotlib:master Aug 18, 2020
@tacaswell

Thanks @richardsheridan , I really appreciate your work on hardening the tk code!

@richardsheridan richardsheridan deleted the backend_tk_tests_to_subprocess branch August 18, 2020 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_never_update is flaky
5 participants
0