You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be missing something blatantly obvious, but it would be nice to be able to change the capture state at runtime. But first, a little context!
I have some code that fiddles with term settings. However, because capture uses a file-like object (that doesn't implement fileno), it will fail when twiddling bit flags. Trivial example:
self = <_pytest.capture.DontReadFromInput instance at 0x102436440>
def fileno(self):
> raise ValueError("redirected Stdin is pseudofile, has no fileno()")
E ValueError: redirected Stdin is pseudofile, has no fileno()
Of course, if you run pytest -s, all is wonderful. However, that's not an option in my case due to the drastic increase in log noise.
The text was updated successfully, but these errors were encountered:
There are fixture functions capfd and capsys that allow you to enable capturing for a particular test, but there doesn't seem to be one for disabling it. I'd like to have one for disabling output capture - one of my tests relies on a subprocess having its stdio connected to a terminal (so it can verify that the subprocess sets its I/O encodings correctly).
I might be missing something blatantly obvious, but it would be nice to be able to change the capture state at runtime. But first, a little context!
I have some code that fiddles with term settings. However, because capture uses a file-like object (that doesn't implement fileno), it will fail when twiddling bit flags. Trivial example:
The above results in:
Of course, if you run
pytest -s
, all is wonderful. However, that's not an option in my case due to the drastic increase in log noise.The text was updated successfully, but these errors were encountered: