@@ -87,7 +87,7 @@ def test_all_tokens(self):
8787 {'data' : {}, 'type' : 'EndTag' , 'namespace' : 'http://www.w3.org/1999/xhtml' , 'name' : 'body' },
8888 {'data' : {}, 'type' : 'EndTag' , 'namespace' : 'http://www.w3.org/1999/xhtml' , 'name' : 'html' }
8989 ]
90- for treeName , treeCls in treeTypes .items ():
90+ for treeName , treeCls in sorted ( treeTypes .items () ):
9191 p = html5parser .HTMLParser (tree = treeCls ["builder" ])
9292 document = p .parse ("<html><head></head><body>a<div>b</div>c</body></html>" )
9393 document = treeCls .get ("adapter" , lambda x : x )(document )
@@ -130,7 +130,7 @@ def runTreewalkerTest(innerHTML, input, expected, errors, treeClass):
130130def test_treewalker ():
131131 sys .stdout .write ('Testing tree walkers ' + " " .join (list (treeTypes .keys ())) + "\n " )
132132
133- for treeName , treeCls in treeTypes .items ():
133+ for treeName , treeCls in sorted ( treeTypes .items () ):
134134 files = get_data_files ('tree-construction' )
135135 for filename in files :
136136 testName = os .path .basename (filename ).replace (".dat" , "" )
@@ -194,6 +194,6 @@ def test_treewalker_six_mix():
194194 '<link>\n href="http://example.com/cow"\n rel="alternate"\n "Example"' )
195195 ]
196196
197- for tree in treeTypes .items ():
197+ for tree in sorted ( treeTypes .items () ):
198198 for intext , attrs , expected in sm_tests :
199199 yield runTreewalkerEditTest , intext , expected , attrs , tree
0 commit comments