File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,23 @@ def test_attached_pane(session):
100100
101101
102102def test_split_window (session ):
103- """Window.split_window() splits window, returns new Pane. """
103+ """Window.split_window() splits window, returns new Pane, vertical. """
104104 window_name = 'test split window'
105105 window = session .new_window (window_name = window_name , attach = True )
106106 pane = window .split_window ()
107107 assert len (window .panes ) == 2
108108 assert isinstance (pane , Pane )
109+ assert float (window .panes [0 ].height ) <= ((float (window .width ) + 1 ) / 2 )
110+
111+
112+ def test_split_window_horizontal (session ):
113+ """Window.split_window() splits window, returns new Pane, horizontal. """
114+ window_name = 'test split window'
115+ window = session .new_window (window_name = window_name , attach = True )
116+ pane = window .split_window (vertical = False )
117+ assert len (window .panes ) == 2
118+ assert isinstance (pane , Pane )
119+ assert float (window .panes [0 ].width ) <= ((float (window .width ) + 1 ) / 2 )
109120
110121
111122@pytest .mark .parametrize ("window_name_before,window_name_after" , [
You can’t perform that action at this time.
0 commit comments