# HG changeset patch # User Gregory Szorc # Date 1549302433 28800 # Node ID 20e62312e016007bdb5dbbc4121260d241f94a6f # Parent fbb43514f34241ae5f7277d2218462144cc13e89 run-tests: set attributes in sorted order Python 3.8 preserves insertion order in serialized output (https://bugs.python.org/issue34160). Older Pythons serialized in sorted order. Let's make insertion order sorted so behavior is consistent across Python versions. Differential Revision: https://phab.mercurial-scm.org/D5831 diff -r fbb43514f342 -r 20e62312e016 tests/run-tests.py --- a/tests/run-tests.py Mon Feb 04 09:41:10 2019 -0800 +++ b/tests/run-tests.py Mon Feb 04 09:47:13 2019 -0800 @@ -2378,12 +2378,12 @@ timesd = dict((t[0], t[3]) for t in result.times) doc = minidom.Document() s = doc.createElement('testsuite') - s.setAttribute('name', 'run-tests') - s.setAttribute('tests', str(result.testsRun)) s.setAttribute('errors', "0") # TODO s.setAttribute('failures', str(len(result.failures))) + s.setAttribute('name', 'run-tests') s.setAttribute('skipped', str(len(result.skipped) + len(result.ignored))) + s.setAttribute('tests', str(result.testsRun)) doc.appendChild(s) for tc in result.successes: t = doc.createElement('testcase')