From 7c3732a1b47bb736ccfd8302aa55e6cf41edff7e Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 10 May 2019 03:04:07 -0700 Subject: Fixed #30470 -- Added assertHTMLEqual() support for all self closing tags. Support for the following tags was added: area, embed, param, track, and wbr. The full list of self closing tags is documented at: https://html.spec.whatwg.org/#void-elements --- tests/test_utils/tests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/test_utils') diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index 2697590b77..f07c0dcd53 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -537,10 +537,12 @@ class HTMLEqualTests(SimpleTestCase): self.assertEqual(dom.children[0], "

foo

'' bar") def test_self_closing_tags(self): - self_closing_tags = ( - 'br', 'hr', 'input', 'img', 'meta', 'spacer', 'link', 'frame', - 'base', 'col', - ) + self_closing_tags = [ + 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', + 'meta', 'param', 'source', 'track', 'wbr', + # Deprecated tags + 'frame', 'spacer', + ] for tag in self_closing_tags: with self.subTest(tag): dom = parse_html('

Hello <%s> world

' % tag) -- cgit v1.3