capture: do not overwrite `sys.__stdin__` etc
Ref: https://github.com/pytest-dev/pytest/pull/4398#discussion_r234333053
This commit is contained in:
parent
0ffb8ddd7f
commit
9ed63c607e
|
@ -770,9 +770,9 @@ def _py36_windowsconsoleio_workaround(stream):
|
||||||
f.line_buffering,
|
f.line_buffering,
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.__stdin__ = sys.stdin = _reopen_stdio(sys.stdin, "rb")
|
sys.stdin = _reopen_stdio(sys.stdin, "rb")
|
||||||
sys.__stdout__ = sys.stdout = _reopen_stdio(sys.stdout, "wb")
|
sys.stdout = _reopen_stdio(sys.stdout, "wb")
|
||||||
sys.__stderr__ = sys.stderr = _reopen_stdio(sys.stderr, "wb")
|
sys.stderr = _reopen_stdio(sys.stderr, "wb")
|
||||||
|
|
||||||
|
|
||||||
def _attempt_to_close_capture_file(f):
|
def _attempt_to_close_capture_file(f):
|
||||||
|
|
Loading…
Reference in New Issue