@@ -97,7 +97,11 @@ def test_focus_pane_index(session: Session) -> None:
97
97
pane_base_index = 0 if not pane_base_index else int (pane_base_index )
98
98
99
99
# 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
+ ]
101
105
102
106
pane_indexes_should_be = [pane_base_index + x for x in range (0 , 3 )]
103
107
assert pane_indexes_should_be == pane_base_indexes
@@ -129,7 +133,7 @@ def f_check() -> bool:
129
133
p = None
130
134
pane_path = "/"
131
135
132
- def f_check_again ():
136
+ def f_check_again () -> bool :
133
137
nonlocal p
134
138
p = window3 .attached_pane
135
139
assert p is not None
@@ -160,7 +164,9 @@ def test_suppress_history(session: Session) -> None:
160
164
builder .build (session = session )
161
165
162
166
inHistoryWindow = session .windows .get (window_name = "inHistory" )
167
+ assert inHistoryWindow is not None
163
168
isMissingWindow = session .windows .get (window_name = "isMissing" )
169
+ assert isMissingWindow is not None
164
170
165
171
def assertHistory (cmd : str , hist : str ) -> bool :
166
172
return "inHistory" in cmd and cmd .endswith (hist )
@@ -175,6 +181,7 @@ def assertIsMissing(cmd: str, hist: str) -> bool:
175
181
assert w .name == window_name
176
182
w .select_window ()
177
183
p = w .attached_pane
184
+ assert p is not None
178
185
p .select_pane ()
179
186
180
187
# Print the last-in-history command in the pane
0 commit comments