Number of test failures is calculated incorrectly

Bug #1203720 reported by Roman Podoliaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Testrepository
New
Undecided
Unassigned

Bug Description

Consider the following test suite:

import unittest

class Test(unittest.TestCase):
    def test_case1(self):
        self.assertTrue(3 > 1) # success

    def test_case2(self):
        self.assertTrue(5 > 1) # success

    def test_case3(self):
        self.assertTrue(2 < 1) # fail

    def test_case4(self):
        self.assertTrue(1 > 2) # fail

    def test_case5(self):
        self.assertTrue(0 > 2) # fail

.testr.conf:

[DEFAULT]
test_command=python -m subunit.run discover . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

Running of "testr run" shows 4 failures instead of 3.
Running of "testr run --parallel" (with 4 CPU cores) shows either 5 or 6 failures instead of 3.
Running of "testr run --parallel --concurrency 1" shows 4 failures instead of 3.
Running of "testr run --parallel --concurrency 2" shows 5 failures instead of 3.
 ...

It seems, that the number of failures reported is equal to the actual number of test failures + the number of testr subprocesses running at least one failing test case.

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.