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
|
||||
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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user