##// END OF EJS Templates
run-tests: make time field optional for xunit report...
Siddharth Agarwal -
r32702:d0b9c368 default
parent child Browse files
Show More
@@ -2016,12 +2016,16 b' class TextTestRunner(unittest.TextTestRu'
2016 for tc in result.successes:
2016 for tc in result.successes:
2017 t = doc.createElement('testcase')
2017 t = doc.createElement('testcase')
2018 t.setAttribute('name', tc.name)
2018 t.setAttribute('name', tc.name)
2019 t.setAttribute('time', '%.3f' % timesd[tc.name])
2019 tctime = timesd.get(tc.name)
2020 if tctime is not None:
2021 t.setAttribute('time', '%.3f' % tctime)
2020 s.appendChild(t)
2022 s.appendChild(t)
2021 for tc, err in sorted(result.faildata.items()):
2023 for tc, err in sorted(result.faildata.items()):
2022 t = doc.createElement('testcase')
2024 t = doc.createElement('testcase')
2023 t.setAttribute('name', tc)
2025 t.setAttribute('name', tc)
2024 t.setAttribute('time', '%.3f' % timesd[tc])
2026 tctime = timesd.get(tc)
2027 if tctime is not None:
2028 t.setAttribute('time', '%.3f' % tctime)
2025 # createCDATASection expects a unicode or it will
2029 # createCDATASection expects a unicode or it will
2026 # convert using default conversion rules, which will
2030 # convert using default conversion rules, which will
2027 # fail if string isn't ASCII.
2031 # fail if string isn't ASCII.
General Comments 0
You need to be logged in to leave comments. Login now