diff options
author | Ran Benita <ran@unusedvar.com> | 2020-12-30 17:34:00 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2021-01-24 14:08:39 +0200 |
commit | 5f4e55fb6d01a1dd199ed0f484e460be7d0e222a (patch) | |
tree | d6b6b883cb1253371fd1f3fd67d6756f83dd6537 /src | |
parent | 42ae8180ddf36fe4810bdfcce72aa72cf8cd3b43 (diff) | |
download | pytest-5f4e55fb6d01a1dd199ed0f484e460be7d0e222a.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/_pytest/runner.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/_pytest/runner.py b/src/_pytest/runner.py index e132a2d8f..017573cec 100644 --- a/src/_pytest/runner.py +++ b/src/_pytest/runner.py @@ -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 |