def test_vsplit(editor, tab_page): # Create new buffer. eb = EditorBuffer(editor) # Insert in tab, by splitting. tab_page.vsplit(eb) assert isinstance(tab_page.root, VSplit) assert len(tab_page.root) == 2
def test_vsplit(self): # Create new buffer. b = Buffer() eb = EditorBuffer('b1', b) # Insert in tab, by splitting. self.tabpage.vsplit(eb) self.assertIsInstance(self.tabpage.root, VSplit) self.assertEqual(len(self.tabpage.root), 2)
def editor_buffer(editor): return EditorBuffer(editor)
def setUp(self): b = Buffer() eb = EditorBuffer('b1', b) self.window = Window(eb) self.tabpage = TabPage(self.window)
def editor_buffer(prompt_buffer): return EditorBuffer(prompt_buffer, 'b1')