"tests" attribute is always reported as 0

Bug #484800 reported by Matt Mason
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjunitxml
Fix Released
Critical
Robert Collins

Bug Description

Hi,

I'm not sure whether my previous attempt to report this succeeded (it didn't seem to), so I'm placing the patch in line this time.

I noticed that the "tests" attribute of the testsuite element was hard-coded to 0. This patch fixed the count for me (using python 2.5.2).

Regards, Matt

53a54
> unittest.TestResult.startTest(self, test)
80c81
< self._stream.write('<testsuite errors="%d" failures="%d" name="" tests="0" time="%0.3f">\n' % (len(self.errors), len(self.failures), duration))
---
> self._stream.write('<testsuite errors="%d" failures="%d" name="" tests="%d" time="%0.3f">\n' % (len(self.errors), len(self.failures), self.testsRun, duration))

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 484800] [NEW] "tests" attribute is always reported as 0

A clear improvement thanks. I'll add a test for this and fix it after
work - probably this weekend, maybe earlier.

 status triaged
 importance critical

Changed in pyjunitxml:
importance: Undecided → Critical
status: New → Triaged
Changed in pyjunitxml:
status: Triaged → Fix Committed
assignee: nobody → Robert Collins (lifeless)
Revision history for this message
Robert Collins (lifeless) wrote :

Fixed in 0.4, which is on PyPI now. Thanks again for the patch.

Changed in pyjunitxml:
status: Fix Committed → Fix Released
milestone: none → 0.4
Revision history for this message
Matt Mason (v-contact-matthew-mason-gmail-com) wrote :

Thanks for applying the patch so quickly.

Also, thanks for making the script available in the first place - it saved me a lot of time!

--Matt

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.