summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/fs.py b/test/fs.py
index 36ba180d..06643385 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1281,13 +1281,14 @@ def test(binary, quic=False):
before = serials()
made = subprocess.Popen([binary, '--wait', fresh.name], cwd=root, env=env,
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ # The launch makes the pane (pane/new), then names it: wait for
+ # the name, not the pane.
deadline = time.monotonic() + 3
- while not serials() - before:
+ while str(fresh).encode() not in client.read('/index'):
assert made.poll() is None, made.stderr.read()
- assert time.monotonic() < deadline, 'a new name opened no pane'
+ assert time.monotonic() < deadline, 'a new name opened no pane named it'
time.sleep(.01)
named, = serials() - before
- assert str(fresh).encode() in client.read('/index')
client.write(f'/pane/{named}/body', b'new\n')
execute(client, named, 'Save')
client.remove(f'/pane/{named}')