diff --git a/_pytest/capture.py b/_pytest/capture.py index 3bab8084d..7734aabf5 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -152,7 +152,7 @@ class CaptureManager: return method def reset_capturings(self): - for name, cap in self._method2capture.items(): + for cap in self._method2capture.values(): cap.reset() def resumecapture_item(self, item):