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:
Ryan Roden-Corrent 2017-12-01 07:35:13 -05:00
parent 822f6bae2c
commit 1102ae4d7e
2 changed files with 5 additions and 7 deletions

View File

@ -115,6 +115,8 @@ Feature: Opening external editors
And I run :click-element id qute-button
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
When I set up a fake editor that waits
And I open data/editor.html

View File

@ -82,12 +82,8 @@ def set_up_editor_wait(quteproc, server, tmpdir):
with open(r'{pidfile}', 'w') as f:
f.write(str(os.getpid()))
signal.signal(signal.SIGINT, lambda s, f: sys.exit(0))
try:
time.sleep(100)
except InterruptedError:
pass
signal.signal(signal.SIGUSR1, lambda s, f: sys.exit(0))
time.sleep(100)
""".format(pidfile=pidfile)))
editor = json.dumps([sys.executable, str(script), '{}'])
quteproc.set_setting('editor.command', editor)
@ -98,4 +94,4 @@ def kill_editor_wait(quteproc, server, tmpdir):
"""Kill the waiting editor."""
pidfile = tmpdir / 'editor_pid'
pid = int(pidfile.read())
os.kill(pid, signal.SIGINT)
os.kill(pid, signal.SIGUSR1)