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

Fix qt key mods#20868

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
timhoffm merged 2 commits intomatplotlib:masterfromtacaswell:fix_qt_key_mods
Aug 20, 2021
Merged

Fix qt key mods#20868

timhoffm merged 2 commits intomatplotlib:masterfromtacaswell:fix_qt_key_mods
Aug 20, 2021

Conversation

tacaswell
Copy link
Member

PR Summary

Fixes a Qt test. It looks like we had a test that never actually worked (the assert happened in a callback so the failure was ignored) which meant that the parameterized tests always passed. When the test was fixed to raise on error this brought to light a miss-match between the computed and expected results which is also fixed.

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.
  • [N/A] 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).

@tacaswelltacaswell added this to thev3.5.0 milestoneAug 20, 2021
Otherwise we ignore the failures
As part ofa4c504c the modified waschanged from SuperModifer to MetaModifier.  Under the new scheme of testingthe keys we were correctly noting that SuperModifier is not in the Qt Modifierenum (the super keys come in through "SpecialKeys").  However, because thefailures were happening in a callback and being ignored, we did not notice thischange.  It is likely that this test never worked for the same reason.
@timhoffmtimhoffm merged commit54b105b intomatplotlib:masterAug 20, 2021
@tacaswelltacaswell deleted the fix_qt_key_mods branchAugust 21, 2021 17:09
@greglucas
Copy link
Contributor

FYI: I just ran the latest tests and these are now failing for me and I'm wondering if it has to do with being on a mac? The tests look like they are swapping cmd/ctrl, so I tried swapping the modifier keys on my system and that didn't help.

FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[Qt5Agg-control] - AssertionError: assert'cmd+a' =='ctrl+a'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[Qt5Agg-alt_control] - AssertionError: assert'alt+cmd' =='alt+control'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[Qt5Agg-control_alt] - AssertionError: assert'cmd+alt' =='ctrl+alt'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[Qt5Agg-modifier_order] - AssertionError: assert'cmd+alt+ctrl+á' =='ctrl+alt+super+á'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[Qt5Agg-backspace_mod] - AssertionError: assert'cmd+backspace' =='ctrl+backspace'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[QtAgg-control] - AssertionError: assert'cmd+a' =='ctrl+a'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[QtAgg-alt_control] - AssertionError: assert'alt+cmd' =='alt+control'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[QtAgg-control_alt] - AssertionError: assert'cmd+alt' =='ctrl+alt'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[QtAgg-modifier_order] - AssertionError: assert'cmd+alt+ctrl+á' =='ctrl+alt+super+á'FAILED lib/matplotlib/tests/test_backend_qt.py::test_correct_key[QtAgg-backspace_mod] - AssertionError: assert'cmd+backspace' =='ctrl+backspace'

It looks like thesemay be getting skipped on the macos-latest CI?

SKIPPED [22] lib/matplotlib/tests/test_backend_qt.py:168: No usable Qt bindings

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic 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.

4 participants
@tacaswell@greglucas@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp