@@ -97,7 +97,11 @@ def test_focus_pane_index(session: Session) -> None:
9797 pane_base_index = 0 if not pane_base_index else int (pane_base_index )
9898
9999 # get the pane index for each pane
100- pane_base_indexes = [int (pane .index ) for pane in session .attached_window .panes ]
100+ pane_base_indexes = [
101+ int (pane .index )
102+ for pane in session .attached_window .panes
103+ if pane is not None and pane .index is not None
104+ ]
101105
102106 pane_indexes_should_be = [pane_base_index + x for x in range (0 , 3 )]
103107 assert pane_indexes_should_be == pane_base_indexes
@@ -129,7 +133,7 @@ def f_check() -> bool:
129133 p = None
130134 pane_path = "/"
131135
132- def f_check_again ():
136+ def f_check_again () -> bool :
133137 nonlocal p
134138 p = window3 .attached_pane
135139 assert p is not None
@@ -160,7 +164,9 @@ def test_suppress_history(session: Session) -> None:
160164 builder .build (session = session )
161165
162166 inHistoryWindow = session .windows .get (window_name = "inHistory" )
167+ assert inHistoryWindow is not None
163168 isMissingWindow = session .windows .get (window_name = "isMissing" )
169+ assert isMissingWindow is not None
164170
165171 def assertHistory (cmd : str , hist : str ) -> bool :
166172 return "inHistory" in cmd and cmd .endswith (hist )
@@ -175,6 +181,7 @@ def assertIsMissing(cmd: str, hist: str) -> bool:
175181 assert w .name == window_name
176182 w .select_window ()
177183 p = w .attached_pane
184+ assert p is not None
178185 p .select_pane ()
179186
180187 # Print the last-in-history command in the pane
0 commit comments