Skip to content

Commit

Permalink
Add linux shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Nov 5, 2024
1 parent de5a9b7 commit 18fe59f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qtconsole/tests/test_qtconsoleapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def test_shortcut_traitlets():


@pytest.mark.parametrize(
"shortcut", ["full_screen", "copy", "cut", "paste", "print", "clear",
"save", "close", "select_all"])
"shortcut", ["undo", "redo", "copy", "cut", "paste", "print", "clear",
"quit", "close", "select_all"])
def test_custom_shortcut_manager(shortcut):
""" Verify that the shortcuts traitlets are set with a custom value.
"""
Expand All @@ -68,5 +68,7 @@ def test_custom_shortcut_manager(shortcut):
# Initialize the application with the simulated arguments
app = JupyterQtConsoleApp()
app.initialize()
window = app.window
# Check if the shortcut traitlet has the expected value
assert getattr(app, f"shortcut_{shortcut}") == "Ctrl+O"
assert getattr(app, f"shortcut_{shortcut}") == "Ctrl+O"
assert getattr(window, f"{shortcut}_action").shortcut().toString() == "Ctrl+O"

0 comments on commit 18fe59f

Please sign in to comment.