runner: remove dead code in teardown_all()

When the stack is empty, the finalizers which are supposed to be
attached to nodes in the stack really ought to be empty as well. So the
code here is dead. If this doesn't happen, the assert will trigger.
This commit is contained in:
Ran Benita 2020-12-30 17:34:00 +02:00
parent 42ae8180dd
commit 5f4e55fb6d
1 changed files with 0 additions and 2 deletions

View File

@ -480,8 +480,6 @@ class SetupState:
def teardown_all(self) -> None:
while self.stack:
self._pop_and_teardown()
for key in list(self._finalizers):
self._teardown_with_finalization(key)
assert not self._finalizers