setUp being called twice is not an error

Bug #882884 reported by Robert Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Wishlist
Robert Collins

Bug Description

But like bug 508200 this indicates broken user code.
E.g.
>>> class T(testtools.TestCase):
... def setUp(self):
... super(T, self).setUp()
... super(T, self).setUp()
... def test_foo(self):
... pass
...
>>> T('test_foo')()
<testtools.testresult.real.ExtendedToOriginalDecorator object at 0x16cff10>
>>>

Changed in testtools:
importance: Medium → Wishlist
Revision history for this message
Ian Wienand (iwienand) wrote :

I hit this problem again today in a round-about-way; due to logging setup done in setUp() logger calls started to disappear only after the second call. This would have saved a fair bit of debugging

Revision history for this message
Robert Collins (lifeless) wrote :
Changed in testtools:
assignee: nobody → Robert Collins (lifeless)
Revision history for this message
Robert Collins (lifeless) wrote :

Fixed in a prior release.

Changed in testtools:
milestone: none → next
status: Triaged → Fix Committed
Changed in testtools:
status: Fix Committed → 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.