Fix test_editor_bdd.py for windows.
- Use a raw string to handle windows path separators - Use SIGTERM instead of SIGUSR1
This commit is contained in:
parent
fcad40ceb7
commit
b465c109ee
@ -79,10 +79,10 @@ def set_up_editor_wait(quteproc, server, tmpdir):
|
||||
import time
|
||||
import signal
|
||||
|
||||
with open('{pidfile}', 'w') as f:
|
||||
with open(r'{pidfile}', 'w') as f:
|
||||
f.write(str(os.getpid()))
|
||||
|
||||
signal.signal(signal.SIGUSR1, lambda s, f: sys.exit(0))
|
||||
signal.signal(signal.SIGTERM, lambda s, f: sys.exit(0))
|
||||
|
||||
time.sleep(100)
|
||||
""".format(pidfile=pidfile)))
|
||||
@ -95,4 +95,4 @@ def kill_editor_wait(quteproc, server, tmpdir):
|
||||
"""Kill the waiting editor."""
|
||||
pidfile = tmpdir / 'editor_pid'
|
||||
pid = int(pidfile.read())
|
||||
os.kill(pid, signal.SIGUSR1)
|
||||
os.kill(pid, signal.SIGTERM)
|
||||
|
Loading…
Reference in New Issue
Block a user