You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@skip_local_focus@skip_on_mac_ci@pytest.mark.key_bindings@pytest.mark.parametrize('confirm_key', ['enter', 'return', 'tab'], )deftest_preferences_dialog_not_dismissed_by_keybind_confirm(
qtbot, pref, confirm_key
):
"""This test ensures that when confirming a keybinding change, the dialog is not dismissed. Notes: * Skipped on macOS CI due to accessibility permissions not being settable on macOS GitHub Actions runners. * For this test to pass locally, you need to give the Terminal/iTerm/VSCode application accessibility permissions: `System Settings > Privacy & Security > Accessibility` See https://github.com/asweigart/pyautogui/issues/247 and https://github.com/asweigart/pyautogui/issues/247#issuecomment-437668855 """shortcut_widget= (
pref._stack.widget(3).widget().widget.widgets['shortcuts']
)
pref._stack.setCurrentIndex(3)
# ensure the dialog is showingpref.show()
qtbot.waitExposed(pref)
assertpref.isVisible()
shortcut=shortcut_widget._table.item(
0, shortcut_widget._shortcut_col
).text()
assertshortcut=='U'x=shortcut_widget._table.columnViewportPosition(
shortcut_widget._shortcut_col
)
y=shortcut_widget._table.rowViewportPosition(0)
item_pos=QPoint(x, y)
qtbot.mouseClick(
shortcut_widget._table.viewport(),
Qt.MouseButton.LeftButton,
pos=item_pos,
)
qtbot.mouseDClick(
shortcut_widget._table.viewport(),
Qt.MouseButton.LeftButton,
pos=item_pos,
)
>qtbot.waitUntil(lambda: QApplication.focusWidget() isnotNone)
Epytestqt.exceptions.TimeoutError: waitUntiltimedoutin5000milliseconds
Saw a timeout recently in napari a test that actually manages window focus, when running the test in a different repo that uses this setup instead: https://github.com/pyapp-kit/superqt/actions/runs/12485275920/job/34843848003?pr=268
here is the test
the only difference I can see is that their headless setup action https://github.com/aganders3/headless-gui uses herbstluftwm in addition to xvfb. (as suggested in pytestqt docs). Would you consider a PR that adds that here?
The text was updated successfully, but these errors were encountered: