From e5ac2b5e0055e7f7c240325e3e54c4e0b7321d6d Mon Sep 17 00:00:00 2001 From: Abraham Toriz Cruz Date: Fri, 27 May 2022 08:11:25 -0500 Subject: [PATCH] fix(tests): use /etc instead of /usr/sbin which could be a symlink (#783) Fixes #620 --- tests/fixtures/workspacebuilder/pane_ordering.yaml | 2 +- tests/test_workspacebuilder.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/fixtures/workspacebuilder/pane_ordering.yaml b/tests/fixtures/workspacebuilder/pane_ordering.yaml index 1d6d54418c..597ae0649e 100644 --- a/tests/fixtures/workspacebuilder/pane_ordering.yaml +++ b/tests/fixtures/workspacebuilder/pane_ordering.yaml @@ -7,5 +7,5 @@ windows: panes: - cd /usr/bin - cd /usr - - cd /usr/sbin + - cd /etc - cd {HOME} diff --git a/tests/test_workspacebuilder.py b/tests/test_workspacebuilder.py index d8593d5c50..223c47bddb 100644 --- a/tests/test_workspacebuilder.py +++ b/tests/test_workspacebuilder.py @@ -525,7 +525,7 @@ def test_pane_order(session): pane_paths = [ "/usr/bin", "/usr", - "/usr/sbin", + "/etc", os.path.realpath(os.path.expanduser("~")), ] @@ -539,10 +539,10 @@ def test_pane_order(session): window_count = len(session._windows) # current window count assert len(s._windows) == window_count + for w, wconf in builder.iter_create_windows(s): for p in builder.iter_create_panes(w, wconf): w.select_layout("tiled") # fix glitch with pane size - p = p assert len(s._windows) == window_count assert isinstance(w, Window) @@ -563,9 +563,7 @@ def f(): p.server._update_panes() return p.current_path == pane_path - retry_until(f) - - assert p.current_path, pane_path + assert retry_until(f) def test_window_index(session):