(self)
| 216 | self.assertEqual(linked, html) |
| 217 | |
| 218 | def test_xhtml_escape(self): |
| 219 | tests = [ |
| 220 | ("<foo>", "<foo>"), |
| 221 | (u"<foo>", u"<foo>"), |
| 222 | (b"<foo>", b"<foo>"), |
| 223 | ("<>&\"'", "<>&"'"), |
| 224 | ("&", "&amp;"), |
| 225 | (u"<\u00e9>", u"<\u00e9>"), |
| 226 | (b"<\xc3\xa9>", b"<\xc3\xa9>"), |
| 227 | ] # type: List[Tuple[Union[str, bytes], Union[str, bytes]]] |
| 228 | for unescaped, escaped in tests: |
| 229 | self.assertEqual(utf8(xhtml_escape(unescaped)), utf8(escaped)) |
| 230 | self.assertEqual(utf8(unescaped), utf8(xhtml_unescape(escaped))) |
| 231 | |
| 232 | def test_xhtml_unescape_numeric(self): |
| 233 | tests = [ |
nothing calls this directly
no test coverage detected