Total number of run test cases is calculated incorrectly

Bug #1203728 reported by Roman Podoliaka
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Critical
Robert Collins

Bug Description

Affected versions: 0.0.16 and 0.0.17

Consider the following test suite:

import unittest

class Test(unittest.TestCase):
    def test_case1(self):
        self.assertTrue(2 > 1)

    def test_case2(self):
        self.assertTrue(2 > 1)

.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:
(venv)rpodolyaka@rpodolyaka-pc:~/sandbox/tesrt$ testr run
running=python -m subunit.run discover .
Ran 4 (+2) tests in 0.000s (-0.000s)
PASSED (id=143)

So the number of run test cases is doubled to the actual number of test cases.

--parallel and --concurrency X have no effect on this.

Revision history for this message
Robert Collins (lifeless) wrote :

Thanks, will get onto this soon.

Changed in testrepository:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
David Kranz (david-kranz) wrote :

Robert thinks this may also be the cause of duplicate log messages at the same time for each tempest test as seen in

http://logs.openstack.org/91/43791/3/check/gate-tempest-devstack-vm-full/07c8c7f/console.html

Revision history for this message
Robert Collins (lifeless) wrote :

Thanks, will get onto this soon.

Dolph Mathews (dolph)
no longer affects: keystone
Revision history for this message
Jonathan Lange (jml) wrote :

https://github.com/testing-cabal/testtools/issues/54 was reported. Might be root cause?

Revision history for this message
Robert Collins (lifeless) wrote :

It is the root cause.

affects: testrepository → testtools
Revision history for this message
Robert Collins (lifeless) wrote :
Changed in testtools:
status: Triaged → Fix Released
milestone: none → next
assignee: nobody → Robert Collins (lifeless)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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