diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py index 5b359fa185..7ff0d100ad 100644 --- a/src/_pytest/capture.py +++ b/src/_pytest/capture.py @@ -177,7 +177,7 @@ def name(self) -> str: def mode(self) -> str: # TextIOWrapper doesn't expose a mode, but at least some of our # tests check it. - assert hasattr(self.buffer, 'mode') + assert hasattr(self.buffer, "mode") return cast(str, self.buffer.mode.replace("b", ""))