Skip to content

Commit 31c6b2d

Browse files
author
James Graham
committed
Add test for scripted change in Noah's Ark
--HG-- extra : transplant_source : %11L%CA%F0%8D%1D%1AV%C7%CC%A0%2B%D8%82%FA%91%82%A4%04%FC
1 parent 52de901 commit 31c6b2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

html5lib/tests/tokenizertotree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def make_test(test_data):
5151
rv.append("#data")
5252
rv.append(test_data["input"].encode("utf8"))
5353
rv.append("#errors")
54-
rv.append("#document")
5554
tree = p.parse(test_data["input"])
56-
output = test_parser.convertTreeDump(p.tree.testSerializer(tree))
57-
output = test_parser.attrlist.sub(test_parser.sortattrs, output)
55+
output = p.tree.testSerializer(tree)
56+
output = "\n".join(("| "+ line[3:]) if line.startswith("| ") else line
57+
for line in output.split("\n"))
5858
output = unnamespaceExpected(r"\1<\2>", output)
5959
rv.append(output.encode("utf8"))
6060
rv.append("")

0 commit comments

Comments
 (0)