In a Py-Repl, Shift Enter Shouldn't Insert Newline (#1094)

* Prevent shift-enter adding newlines in Py-Repl

* Add test
This commit is contained in:
Jeff Glass
2023-01-04 12:26:46 -06:00
committed by GitHub
parent 412da2de08
commit 77d98a565e
2 changed files with 5 additions and 2 deletions

View File

@@ -69,6 +69,9 @@ class TestPyRepl(PyScriptTest):
assert self.console.log.lines[0] == self.PY_COMPLETE
assert self.console.log.lines[-1] == "hello world"
# Shift-enter should not add a newline to the editor
assert self.page.locator(".cm-line").count() == 1
def test_display(self):
self.pyscript_run(
"""