| --- junitxml/__init__.py 2018-04-12 15:13:39.394382000 +0300 |
| +++ junitxml/__init__.py 2018-04-12 16:58:12.288281319 +0300 |
| @@ -165,10 +165,16 @@ |
| run. |
| """ |
| duration = self._duration(self._run_start) |
| - self._stream.write('<testsuite errors="%d" failures="%d" name="" ' |
| - 'tests="%d" time="%0.3f">\n' % (len(self.errors), |
| + |
| + if len(self.skipped) == 0: |
| + skipped = "" |
| + else: |
| + skipped = 'skipped="{}" '.format(len(self.skipped)) |
| + |
| + self._stream.write('<testsuite errors="%d" failures="%d"' |
| + ' skipped="%d" name="" tests="%d" time="%0.3f">\n' % (len(self.errors), |
| len(self.failures) + len(getattr(self, "unexpectedSuccesses", ())), |
| - self.testsRun, duration)) |
| + len(self.skipped), self.testsRun, duration)) |
| self._stream.write(''.join(self._results)) |
| self._stream.write('</testsuite>\n') |
| |