def _setUp_collapse(self, parent=None):
        """ Creates a root, its leftchild and rightchild, so that collapse can
        be tested on one of the children.

        Returns the root, leftchild and rightchild of such layout.

        parent : parent of the returned root
        """
        # setup leftchild
        left = EditorAreaWidget(editor_area=SplitEditorAreaPane(), parent=None)
        btn0 = QtGui.QPushButton('btn0')
        btn1 = QtGui.QPushButton('btn1')
        tabwidget = left.tabwidget()
        tabwidget.addTab(btn0, '0')
        tabwidget.addTab(btn1, '1')
        tabwidget.setCurrentIndex(1)
        
        # setup rightchild
        right = EditorAreaWidget(editor_area=left.editor_area, parent=None)
        btn2 = QtGui.QPushButton('btn2')
        btn3 = QtGui.QPushButton('btn3')
        tabwidget = right.tabwidget()
        tabwidget.addTab(btn2, '2')
        tabwidget.addTab(btn3, '3')
        tabwidget.setCurrentIndex(0)
        
        # setup root
        root = EditorAreaWidget(editor_area=left.editor_area, parent=parent)
        tabwidget = root.tabwidget()
        tabwidget.setParent(None)
        root.addWidget(left)
        root.addWidget(right)
        root.leftchild = left
        root.rightchild = right

        return root, left, right
    def _setUp_collapse(self, parent=None):
        """ Creates a root, its leftchild and rightchild, so that collapse can
        be tested on one of the children.

        Returns the root, leftchild and rightchild of such layout.

        parent : parent of the returned root
        """
        # setup leftchild
        left = EditorAreaWidget(editor_area=SplitEditorAreaPane(), parent=None)
        btn0 = QtGui.QPushButton('btn0')
        btn1 = QtGui.QPushButton('btn1')
        tabwidget = left.tabwidget()
        tabwidget.addTab(btn0, '0')
        tabwidget.addTab(btn1, '1')
        tabwidget.setCurrentIndex(1)

        # setup rightchild
        right = EditorAreaWidget(editor_area=left.editor_area, parent=None)
        btn2 = QtGui.QPushButton('btn2')
        btn3 = QtGui.QPushButton('btn3')
        tabwidget = right.tabwidget()
        tabwidget.addTab(btn2, '2')
        tabwidget.addTab(btn3, '3')
        tabwidget.setCurrentIndex(0)

        # setup root
        root = EditorAreaWidget(editor_area=left.editor_area, parent=parent)
        tabwidget = root.tabwidget()
        tabwidget.setParent(None)
        root.addWidget(left)
        root.addWidget(right)
        root.leftchild = left
        root.rightchild = right

        return root, left, right