blob: c8ec4ca49a6493ee56510c0e3067ee8c587fa571 [file] [log] [blame]
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +03001--- junitxml/__init__.py 2018-04-12 15:13:39.394382000 +0300
2+++ junitxml/__init__.py 2018-04-12 16:58:12.288281319 +0300
3@@ -165,10 +165,16 @@
4 run.
5 """
6 duration = self._duration(self._run_start)
7- self._stream.write('<testsuite errors="%d" failures="%d" name="" '
8- 'tests="%d" time="%0.3f">\n' % (len(self.errors),
9+
10+ if len(self.skipped) == 0:
11+ skipped = ""
12+ else:
13+ skipped = 'skipped="{}" '.format(len(self.skipped))
14+
15+ self._stream.write('<testsuite errors="%d" failures="%d"'
16+ ' skipped="%d" name="" tests="%d" time="%0.3f">\n' % (len(self.errors),
17 len(self.failures) + len(getattr(self, "unexpectedSuccesses", ())),
18- self.testsRun, duration))
19+ len(self.skipped), self.testsRun, duration))
20 self._stream.write(''.join(self._results))
21 self._stream.write('</testsuite>\n')
22