runner: replace setdefault with an unconditional set

The already-exists case is not supposed to happen.
This commit is contained in:
Ran Benita 2021-01-01 21:48:03 +02:00
parent 960ebae943
commit 03c3a90c68
1 changed files with 3 additions and 1 deletions

View File

@ -422,8 +422,10 @@ class SetupState:
needed_collectors = colitem.listchain()
for col in needed_collectors[len(self.stack) :]:
assert col not in self.stack
assert col not in self._finalizers
self.stack.append(col)
self._finalizers.setdefault(col, [])
self._finalizers[col] = []
try:
col.setup()
except TEST_OUTCOME as e: