Try to stabilize editor end2end test
Let's also wait until we're sure the mtime changed here.
This commit is contained in:
parent
15fecc962d
commit
ea80ded8d5
@ -85,8 +85,13 @@ def set_up_editor_wait(quteproc, tmpdir, text):
|
||||
import signal
|
||||
|
||||
def handle(sig, _frame):
|
||||
with open(sys.argv[1], 'w', encoding='utf-8') as f:
|
||||
f.write({text!r})
|
||||
filename = sys.argv[1]
|
||||
old_mtime = new_mtime = os.stat(filename).st_mtime
|
||||
while old_mtime == new_mtime:
|
||||
time.sleep(0.1)
|
||||
with open(filename, 'w', encoding='utf-8') as f:
|
||||
f.write({text!r})
|
||||
new_mtime = os.stat(filename).st_mtime
|
||||
if sig == signal.SIGUSR1:
|
||||
sys.exit(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user