    def test_vertical_divider(self):
        """
        Check VerticalDivider widget works as expected.
        """
        # Now set up the Frame ready for testing
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        scene = Scene([], duration=-1)
        canvas = Canvas(screen, 10, 40, 0, 0)
        form = Frame(canvas, canvas.height, canvas.width)
        layout = Layout([5, 1, 26, 1, 5])
        form.add_layout(layout)
        layout.add_widget(Label("A"), 1)
        layout.add_widget(VerticalDivider(), 1)
        layout.add_widget(Label("B"), 1)
        layout.add_widget(TextBox(5), 2)
        divider = VerticalDivider()
        layout.add_widget(divider, 3)
        layout.add_widget(Label("END"), 4)
        form.fix()
        scene.add_effect(form)
        scene.reset()

        # Check that the frame is rendered correctly.
        for effect in scene.effects:
            effect.update(0)
        self.assert_canvas_equals(
            canvas,
            "+--------------------------------------+\n" +
            "|     A                          |END  |\n" +
            "|     |                          |     O\n" +
            "|     |                          |     |\n" +
            "|     |                          |     |\n" +
            "|     B                          |     |\n" +
            "|                                      |\n" +
            "|                                      |\n" +
            "|                                      |\n" +
            "+--------------------------------------+\n")

        # Check that a vertcial divider ignores unknown events.
        event = object()
        self.assertEqual(event, divider.process_event(event))

        # Check that it has no value.
        self.assertEqual(divider.value, None)
Check VerticalDivider widget works as expected.
tests/test_widgets.py