unittest-xml-reporting icon indicating copy to clipboard operation
unittest-xml-reporting copied to clipboard

Wrong testcount when using subTest

Open Flamefire opened this issue 5 months ago • 0 comments

Related to #210

When using subTest the subtests will be counted in the "tests" attribute but no testcase element is generated so the numbers won't match.

Example for a single test with 1 out of 2 subtests failing:

<testsuites>
  <testsuite name="pytest" errors="0" failures="1" skipped="0" tests="2" [snip]>
    <testcase classname="MiscTests" name="test_pytree_tree_leaves" time="13.493" file="dynamo/test_misc.py">
      <failure message=" [snip]">[snip]</failure>
      <system-out>[snip]</system-out>
    </testcase>
  </testsuite>
</testsuites>

Is this (also) expected or could this be fixed?

Flamefire avatar May 20 '25 09:05 Flamefire