    def test_bubble(self):
        """
        Check that the SpeechBubble renderer works.
        """
        # Standard rendering.
        renderer = SpeechBubble("hello")
        self.assertEqual(str(renderer),
                         ".-------.\n" +
                         "| hello |\n" +
                         "`-------`")

        # Left bubble.
        renderer = SpeechBubble("world", tail="L")
        self.assertEqual(str(renderer),
                         ".-------.\n" +
                         "| world |\n" +
                         "`-------`\n" +
                         "  )/  \n" +
                         "-\"`\n")

        # Right bubble
        renderer = SpeechBubble("bye!", tail="R")
        self.assertEqual(str(renderer),
                         ".------.\n" +
                         "| bye! |\n" +
                         "`------`\n" +
                         "    \\(  \n" +
                         "     `\"-\n")

        # Unicode rendering.
        renderer = SpeechBubble("hello", uni=True)
        self.assertEqual(str(renderer),
                         "╭───────╮\n"
                         "│ hello │\n"
                         "╰───────╯")

        # Multiline text rendering
        text = "Hello\n" \
               "World! \n" \
               "Hello World!"

        renderer = SpeechBubble(text, uni=True)
        self.assertEqual(str(renderer),
                         "╭──────────────╮\n" +
                         "│ Hello        │\n" +
                         "│ World!       │\n" +
                         "│ Hello World! │\n" +
                         "╰──────────────╯")

        # Test render height
        renderer = SpeechBubble("Hello World", uni=True)
        self.assertEqual(renderer.max_height, 3)
Check that the SpeechBubble renderer works.
tests/renderers/test_other.py