Skip to content

Commit 253a920

Browse files
committed
fix(Server): update Server.windows doctest to be environment-agnostic
1 parent 7254f1a commit 253a920

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/libtmux/server.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,12 @@ def windows(self) -> QueryList[Window]:
713713
>>> # Verify window names
714714
>>> wins1 = [w for w in server.windows if w.session.name == "test_windows1"]
715715
>>> wins2 = [w for w in server.windows if w.session.name == "test_windows2"]
716-
>>> sorted(w.name for w in wins1)
717-
['win1', ...]
718-
>>> sorted(w.name for w in wins2)
719-
['win2', ...]
716+
>>> # Default window name can vary (bash, zsh), but win1 should be there
717+
>>> "win1" in [w.name for w in wins1]
718+
True
719+
>>> # Default window name can vary, but win2 should be there
720+
>>> "win2" in [w.name for w in wins2]
721+
True
720722
>>> # Clean up
721723
>>> server.kill_session("test_windows1")
722724
Server(socket_name=libtmux_test...)

0 commit comments

Comments
 (0)