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.
hg-reviewers |
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.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/run-tests.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Gregory Szorc | Feb 4 2019, 12:47 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | D5843 doc: escape backslash | |
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
self.stream.writeln(cols % (start, end, cuser, csys, real, test)) | self.stream.writeln(cols % (start, end, cuser, csys, real, test)) | ||||
@staticmethod | @staticmethod | ||||
def _writexunit(result, outf): | def _writexunit(result, outf): | ||||
# See http://llg.cubic.org/docs/junit/ for a reference. | # See http://llg.cubic.org/docs/junit/ for a reference. | ||||
timesd = dict((t[0], t[3]) for t in result.times) | timesd = dict((t[0], t[3]) for t in result.times) | ||||
doc = minidom.Document() | doc = minidom.Document() | ||||
s = doc.createElement('testsuite') | s = doc.createElement('testsuite') | ||||
s.setAttribute('name', 'run-tests') | |||||
s.setAttribute('tests', str(result.testsRun)) | |||||
s.setAttribute('errors', "0") # TODO | s.setAttribute('errors', "0") # TODO | ||||
s.setAttribute('failures', str(len(result.failures))) | s.setAttribute('failures', str(len(result.failures))) | ||||
s.setAttribute('name', 'run-tests') | |||||
s.setAttribute('skipped', str(len(result.skipped) + | s.setAttribute('skipped', str(len(result.skipped) + | ||||
len(result.ignored))) | len(result.ignored))) | ||||
s.setAttribute('tests', str(result.testsRun)) | |||||
doc.appendChild(s) | doc.appendChild(s) | ||||
for tc in result.successes: | for tc in result.successes: | ||||
t = doc.createElement('testcase') | t = doc.createElement('testcase') | ||||
t.setAttribute('name', tc.name) | t.setAttribute('name', tc.name) | ||||
tctime = timesd.get(tc.name) | tctime = timesd.get(tc.name) | ||||
if tctime is not None: | if tctime is not None: | ||||
t.setAttribute('time', '%.3f' % tctime) | t.setAttribute('time', '%.3f' % tctime) | ||||
s.appendChild(t) | s.appendChild(t) |