Skip to content

Commit f0b83b2

Browse files
committed
typing fix
1 parent 3459c64 commit f0b83b2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/_pytest/capture.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,10 @@ def writeorg(self, data):
709709
class TeeSysCapture(SysCapture):
710710
def __init__(self, fd: int) -> None:
711711
old = getattr(sys, patchsysdict[fd])
712-
if fd != 0:
713-
tmpfile = PassthroughCaptureIO(old)
712+
if fd == 0:
713+
super().__init__(fd)
714714
else:
715-
tmpfile = None
716-
super().__init__(fd, tmpfile)
715+
super().__init__(fd, PassthroughCaptureIO(old))
717716
assert self._old == old, (self._old, old)
718717

719718

0 commit comments

Comments
 (0)