testtools 0.9.36+ breaks unit tests for multiple projects

Bug #1360252 reported by Ihar Hrachyshka
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Fix Released
Fix Committed

Bug Description

Tests fails as in [1]:

Traceback (most recent call last):
  File "neutron/tests/unit/services/loadbalancer/test_loadbalancer_plugin.py", line 84, in setUp
    super(LoadBalancerExtensionTestCase, self).setUp()
  File "neutron/tests/unit/testlib_api.py", line 56, in setUp
    super(WebTestCase, self).setUp()
  File "neutron/tests/base.py", line 52, in setUp
    super(BaseTestCase, self).setUp()
  File "/home/jenkins/workspace/gate-neutron-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 663, in setUp
    % (sys.modules[self.__class__.__module__].__file__,))
ValueError: In File: neutron/tests/unit/services/loadbalancer/test_loadbalancer_plugin.pyc
TestCase.setUp was already called. Do not explicitly call setUp from your tests. In your own setUp, use super to call the base setUp.

This is due to the following check in new testtools [2].

[1]: http://logs.openstack.org/53/108453/3/check/gate-neutron-python26/9f8d04e/testr_results.html.gz

Louis Taylor (kragniz)
Changed in glance:
status: New → Confirmed
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Patch for sqlalchemy-migrate: https://review.openstack.org/116292
Patch for neutron (havana): https://review.openstack.org/116271

Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :
Louis Taylor (kragniz)
Changed in glance:
status: Confirmed → Fix Committed
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Ihar, is there a patch for upstream or it is not affected?

Changed in neutron:
importance: Undecided → Medium
status: New → Incomplete
Thierry Carrez (ttx)
Changed in glance:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sqlalchemy-migrate (master)

Reviewed: https://review.openstack.org/116292
Committed: https://git.openstack.org/cgit/stackforge/sqlalchemy-migrate/commit/?id=feb0c15aee33e98d20c070c059255c0cca3fe641
Submitter: Jenkins
Branch: master

commit feb0c15aee33e98d20c070c059255c0cca3fe641
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Aug 22 23:32:22 2014 +0200

    Pin testtools to < 0.9.36

    New testtools require that setUp() and tearDown() are not called twice,
    while test_schema is built around multiple calls. So pinning the version
    for now until a proper fix is implemented.

    Closes-Bug: 1360252
    Change-Id: I184db35242d036dacc7933c1d762cccc7f5c40bb

Changed in sqlalchemy-migrate:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-3 → 2014.2
Revision history for this message
Aditi Rajagopal (aditirajagopal) wrote :

A fix was released in Havana as per this patch - https://review.openstack.org/#/c/117037/3

A fix was merged into master as per this patch - https://review.openstack.org/#/c/70668/

Neutron currently uses testtools>=1.4.0 (as per test-requirements.txt)

Changed in neutron:
status: Incomplete → Fix Released
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.