@@ -22,12 +22,15 @@ def test_select_window(session: Session) -> None:
22
22
# for now however, let's get the index from the first window.
23
23
assert window_count == 1
24
24
25
+ assert session .attached_window is not None
26
+ assert session .attached_window .index is not None
25
27
window_base_index = int (session .attached_window .index )
26
28
27
29
window = session .new_window (window_name = "testing 3" )
28
30
29
31
# self.assertEqual(2,
30
32
# int(session.attached_window.index))
33
+ assert window .index is not None
31
34
assert int (window_base_index ) + 1 == int (window .index )
32
35
33
36
session .select_window (str (window_base_index ))
@@ -118,6 +121,8 @@ def test_split_window(session: Session) -> None:
118
121
pane = window .split_window ()
119
122
assert len (window .panes ) == 2
120
123
assert isinstance (pane , Pane )
124
+ assert window .width is not None
125
+ assert window .panes [0 ].height is not None
121
126
assert float (window .panes [0 ].height ) <= ((float (window .width ) + 1 ) / 2 )
122
127
123
128
@@ -129,6 +134,8 @@ def test_split_window_shell(session: Session) -> None:
129
134
pane = window .split_window (shell = cmd )
130
135
assert len (window .panes ) == 2
131
136
assert isinstance (pane , Pane )
137
+ assert window .width is not None
138
+ assert window .panes [0 ].height is not None
132
139
assert float (window .panes [0 ].height ) <= ((float (window .width ) + 1 ) / 2 )
133
140
if has_gte_version ("3.2" ):
134
141
assert pane .get ("pane_start_command" , "" ).replace ('"' , "" ) == cmd
@@ -143,6 +150,8 @@ def test_split_window_horizontal(session: Session) -> None:
143
150
pane = window .split_window (vertical = False )
144
151
assert len (window .panes ) == 2
145
152
assert isinstance (pane , Pane )
153
+ assert window .width is not None
154
+ assert window .panes [0 ].width is not None
146
155
assert float (window .panes [0 ].width ) <= ((float (window .width ) + 1 ) / 2 )
147
156
148
157
@@ -274,6 +283,7 @@ def test_move_window(session: Session) -> None:
274
283
"""Window.move_window results in changed index"""
275
284
276
285
window = session .new_window (window_name = "test_window" )
286
+ assert window .index is not None
277
287
new_index = str (int (window .index ) + 1 )
278
288
window .move_window (new_index )
279
289
assert window .index == new_index
@@ -304,6 +314,7 @@ def test_empty_window_name(session: Session) -> None:
304
314
305
315
assert window == session .attached_window
306
316
assert window .get ("window_name" ) == "''"
317
+ assert session .name is not None
307
318
308
319
cmd = session .cmd (
309
320
"list-windows" ,
0 commit comments