File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -409,16 +409,15 @@ def _teardown_towards(self, needed_collectors) -> None:
409
409
raise exc
410
410
411
411
def prepare (self , colitem ) -> None :
412
- """ setup objects along the collector chain to the test-method
413
- and teardown previously setup objects."""
414
- needed_collectors = colitem .listchain ()
415
- self ._teardown_towards (needed_collectors )
412
+ """Setup objects along the collector chain to the test-method."""
416
413
417
414
# check if the last collection node has raised an error
418
415
for col in self .stack :
419
416
if hasattr (col , "_prepare_exc" ):
420
417
exc = col ._prepare_exc # type: ignore[attr-defined] # noqa: F821
421
418
raise exc
419
+
420
+ needed_collectors = colitem .listchain ()
422
421
for col in needed_collectors [len (self .stack ) :]:
423
422
self .stack .append (col )
424
423
try :
You can’t perform that action at this time.
0 commit comments