Skip to content

Commit 148e3c5

Browse files
committed
pytester: always close stdin pipe in pytester.run()
If the user passed stdin=PIPE for some reason, they have no way to close it themselves since it is not exposed.
1 parent 3e0bbd2 commit 148e3c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ def run(
13491349
stderr=f2,
13501350
close_fds=(sys.platform != "win32"),
13511351
)
1352-
if isinstance(stdin, bytes):
1352+
if popen.stdin is not None:
13531353
popen.stdin.close()
13541354

13551355
def handle_timeout() -> None:

0 commit comments

Comments
 (0)