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.
This commit is contained in:
parent
3e0bbd2f57
commit
148e3c582a
|
@ -1349,7 +1349,7 @@ class Pytester:
|
||||||
stderr=f2,
|
stderr=f2,
|
||||||
close_fds=(sys.platform != "win32"),
|
close_fds=(sys.platform != "win32"),
|
||||||
)
|
)
|
||||||
if isinstance(stdin, bytes):
|
if popen.stdin is not None:
|
||||||
popen.stdin.close()
|
popen.stdin.close()
|
||||||
|
|
||||||
def handle_timeout() -> None:
|
def handle_timeout() -> None:
|
||||||
|
|
Loading…
Reference in New Issue