Skip editor orphaned test on windows.
Tried SIGINT/SIGTERM, neither worked. Just skip this test on windows and go back to SIGUSR1 otherwise.
This commit is contained in:
parent
822f6bae2c
commit
1102ae4d7e
@ -115,6 +115,8 @@ Feature: Opening external editors
|
|||||||
And I run :click-element id qute-button
|
And I run :click-element id qute-button
|
||||||
Then the javascript message "text: foobar" should be logged
|
Then the javascript message "text: foobar" should be logged
|
||||||
|
|
||||||
|
# Could not get signals working on Windows
|
||||||
|
@posix
|
||||||
Scenario: Spawning an editor and closing the tab
|
Scenario: Spawning an editor and closing the tab
|
||||||
When I set up a fake editor that waits
|
When I set up a fake editor that waits
|
||||||
And I open data/editor.html
|
And I open data/editor.html
|
||||||
|
@ -82,12 +82,8 @@ def set_up_editor_wait(quteproc, server, tmpdir):
|
|||||||
with open(r'{pidfile}', 'w') as f:
|
with open(r'{pidfile}', 'w') as f:
|
||||||
f.write(str(os.getpid()))
|
f.write(str(os.getpid()))
|
||||||
|
|
||||||
signal.signal(signal.SIGINT, lambda s, f: sys.exit(0))
|
signal.signal(signal.SIGUSR1, lambda s, f: sys.exit(0))
|
||||||
|
time.sleep(100)
|
||||||
try:
|
|
||||||
time.sleep(100)
|
|
||||||
except InterruptedError:
|
|
||||||
pass
|
|
||||||
""".format(pidfile=pidfile)))
|
""".format(pidfile=pidfile)))
|
||||||
editor = json.dumps([sys.executable, str(script), '{}'])
|
editor = json.dumps([sys.executable, str(script), '{}'])
|
||||||
quteproc.set_setting('editor.command', editor)
|
quteproc.set_setting('editor.command', editor)
|
||||||
@ -98,4 +94,4 @@ def kill_editor_wait(quteproc, server, tmpdir):
|
|||||||
"""Kill the waiting editor."""
|
"""Kill the waiting editor."""
|
||||||
pidfile = tmpdir / 'editor_pid'
|
pidfile = tmpdir / 'editor_pid'
|
||||||
pid = int(pidfile.read())
|
pid = int(pidfile.read())
|
||||||
os.kill(pid, signal.SIGINT)
|
os.kill(pid, signal.SIGUSR1)
|
||||||
|
Loading…
Reference in New Issue
Block a user