Skip to content
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

Make pywin32 optional in Ctrl+C Qt test. #20883

Merged
merged 1 commit into from Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_backend_qt.py
Expand Up @@ -39,8 +39,8 @@ def platform_simulate_ctrl_c(request):
from functools import partial

if hasattr(signal, "CTRL_C_EVENT"):
from win32api import GenerateConsoleCtrlEvent
return partial(GenerateConsoleCtrlEvent, 0, 0)
win32api = pytest.importorskip('win32api')
return partial(win32api.GenerateConsoleCtrlEvent, 0, 0)
else:
# we're not on windows
return partial(os.kill, os.getpid(), signal.SIGINT)
Expand Down
1 change: 1 addition & 0 deletions requirements/testing/extra.txt
Expand Up @@ -6,3 +6,4 @@ nbformat!=5.0.0,!=5.0.1
pandas!=0.25.0
pikepdf
pytz
pywin32; sys.platform == 'win32'