How to use the ansi2html.converter.ANSI_BLINK_SLOW function in ansi2html

To help you get started, we’ve selected a few ansi2html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ralphbean / ansi2html / tests / test_ansi2html.py View on Github external
def test_blinking_text(self):
        sample = '\x1b[%dm555\x1b[%dm666\x1b[%dmNOBLINK\x1b[0m' % (ANSI_BLINK_SLOW, ANSI_BLINK_FAST, ANSI_BLINK_OFF)

        html = Ansi2HTMLConverter(inline=True).convert(sample, full=False)
        expected = six.u('<span style="text-decoration: blink">555</span><span style="text-decoration: blink">666</span>NOBLINK')
        self.assertEqual(expected, html)

        html = Ansi2HTMLConverter(inline=False).convert(sample, full=False)
        expected = six.u('<span class="ansi5">555</span><span class="ansi6">666</span>NOBLINK')
        self.assertEqual(expected, html)