@@ -22,12 +22,15 @@ def test_select_window(session: Session) -> None:
2222 # for now however, let's get the index from the first window.
2323 assert window_count == 1
2424
25+ assert session .attached_window is not None
26+ assert session .attached_window .index is not None
2527 window_base_index = int (session .attached_window .index )
2628
2729 window = session .new_window (window_name = "testing 3" )
2830
2931 # self.assertEqual(2,
3032 # int(session.attached_window.index))
33+ assert window .index is not None
3134 assert int (window_base_index ) + 1 == int (window .index )
3235
3336 session .select_window (str (window_base_index ))
@@ -118,6 +121,8 @@ def test_split_window(session: Session) -> None:
118121 pane = window .split_window ()
119122 assert len (window .panes ) == 2
120123 assert isinstance (pane , Pane )
124+ assert window .width is not None
125+ assert window .panes [0 ].height is not None
121126 assert float (window .panes [0 ].height ) <= ((float (window .width ) + 1 ) / 2 )
122127
123128
@@ -129,6 +134,8 @@ def test_split_window_shell(session: Session) -> None:
129134 pane = window .split_window (shell = cmd )
130135 assert len (window .panes ) == 2
131136 assert isinstance (pane , Pane )
137+ assert window .width is not None
138+ assert window .panes [0 ].height is not None
132139 assert float (window .panes [0 ].height ) <= ((float (window .width ) + 1 ) / 2 )
133140 if has_gte_version ("3.2" ):
134141 assert pane .get ("pane_start_command" , "" ).replace ('"' , "" ) == cmd
@@ -143,6 +150,8 @@ def test_split_window_horizontal(session: Session) -> None:
143150 pane = window .split_window (vertical = False )
144151 assert len (window .panes ) == 2
145152 assert isinstance (pane , Pane )
153+ assert window .width is not None
154+ assert window .panes [0 ].width is not None
146155 assert float (window .panes [0 ].width ) <= ((float (window .width ) + 1 ) / 2 )
147156
148157
@@ -274,6 +283,7 @@ def test_move_window(session: Session) -> None:
274283 """Window.move_window results in changed index"""
275284
276285 window = session .new_window (window_name = "test_window" )
286+ assert window .index is not None
277287 new_index = str (int (window .index ) + 1 )
278288 window .move_window (new_index )
279289 assert window .index == new_index
@@ -304,6 +314,7 @@ def test_empty_window_name(session: Session) -> None:
304314
305315 assert window == session .attached_window
306316 assert window .get ("window_name" ) == "''"
317+ assert session .name is not None
307318
308319 cmd = session .cmd (
309320 "list-windows" ,
0 commit comments