def METHOD_NAME(num, expected):
    for format in numeric_formats:
        text = format % num
        self.assertEqual(html.unescape(text), expected,
                         msg=errmsg % (text, expected))