if _setUp() fails in useFixture(fixture) then TypeError is raised
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
High
|
Julian Edwards |
Bug Description
This bug seems like a regression caused by https:/
When we raise an exception in _setUp() method, cleanups are called properly. But later then useFixtures() uses getDetails() that use internal _details, which were already set to None by calling _remove_state() in cleanUp() method.
Seems like useFixtures() doesn't count on that cleanUp() was already called above fixture object.
File "neutron/
fix = self.parent.
File "/usr/lib/
gather_
File "/usr/lib/
result = dict(self._details)
TypeError: 'NoneType' object is not iterable
Changed in testtools: | |
milestone: | 1.8.1 → none |
Changed in testtools: | |
milestone: | none → next |
status: | Fix Committed → Fix Released |
This isn't a regression. It was poor (invalid) API use by testtools, which this now highlights.
I'm retargeting the bug to testtools, which is where we need to fix this. But it only shows up as a cascade failure - it won't cause tests to spuriously pass, or to spuriously fail.