runner: make sure SetupState._finalizers is always set for a node in the stack
This makes the stack <-> _finalizers correspondence clearer.
This commit is contained in:
parent
d1fcd425a3
commit
14d71b2c22
|
@ -423,6 +423,7 @@ class SetupState:
|
|||
needed_collectors = colitem.listchain()
|
||||
for col in needed_collectors[len(self.stack) :]:
|
||||
self.stack.append(col)
|
||||
self._finalizers.setdefault(col, [])
|
||||
try:
|
||||
col.setup()
|
||||
except TEST_OUTCOME as e:
|
||||
|
@ -444,7 +445,7 @@ class SetupState:
|
|||
break
|
||||
try:
|
||||
colitem = self.stack.pop()
|
||||
finalizers = self._finalizers.pop(colitem, None)
|
||||
finalizers = self._finalizers.pop(colitem)
|
||||
inner_exc = None
|
||||
while finalizers:
|
||||
fin = finalizers.pop()
|
||||
|
|
Loading…
Reference in New Issue