Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move sigint tests into subprocesses#20907

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jklymak merged 6 commits intomatplotlib:masterfromQuLogic:qt-interrupt-popen
Oct 1, 2021

Conversation

QuLogic
Copy link
Member

@QuLogicQuLogic commentedAug 26, 2021
edited
Loading

PR Summary

This prevents them accidentally breaking the test runner itself, depending on platform. Also, enable Qt tests on AppVeyor. A followup to#20883.

I haven't convertedtest_fig_sigint_override yet, as I want to see if this works on Windows.test_fig_sigint_override doesn't actually fire any signals, but I modified it to ensure it doesn't leave broken global state.

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [n/a] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic
Copy link
MemberAuthor

Strange, it fails when the entire test suite is run, but not when running only the one test (or even just the one file).

@QuLogic
Copy link
MemberAuthor

Ah, it's probably becauseprint is not safe in signal handlers, and the interrupt occurs immediately after instead of waiting a bit.

@QuLogicQuLogicforce-pushed theqt-interrupt-popen branch 2 times, most recently from6eab1f1 tof2740fdCompareAugust 31, 2021 21:06
@tacaswelltacaswellforce-pushed theqt-interrupt-popen branch 3 times, most recently from112668e toa40759cCompareSeptember 16, 2021 23:05
qt_core.QTimer.singleShot(100, fire_sigint)
def custom_signal_handler(signum, frame):
timer.start()
signal.signal(signal.SIGUSR1, custom_signal_handler)
Copy link
Member

Choose a reason for hiding this comment

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

There is a whole bunch of code here that is not being run. Is that on purpose/it will be run at a later date?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Everything in*_impl functions are run in a subprocess which coverage doesn't see.

Copy link
Contributor

@anntzeranntzer left a comment

Choose a reason for hiding this comment

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

+/- explaining why the BlockingIOError can be ignored.

@jklymakjklymak merged commit5725b91 intomatplotlib:masterOct 1, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestOct 1, 2021
@QuLogicQuLogic deleted the qt-interrupt-popen branchOctober 1, 2021 09:02
timhoffm added a commit that referenced this pull requestOct 1, 2021
…907-on-v3.5.xBackport PR#20907 on branch v3.5.x (Move sigint tests into subprocesses)
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull requestOct 12, 2021
tacaswell pushed a commit that referenced this pull requestOct 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@anntzeranntzeranntzer approved these changes

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

5 participants
@QuLogic@tacaswell@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp