Merge pull request #6028 from blueyed/DontReadFromInput-msg
capture: improve message with DontReadFromInput's IOError
This commit is contained in:
commit
8316d4392a
|
@ -696,7 +696,9 @@ class DontReadFromInput:
|
||||||
encoding = None
|
encoding = None
|
||||||
|
|
||||||
def read(self, *args):
|
def read(self, *args):
|
||||||
raise IOError("reading from stdin while output is captured")
|
raise IOError(
|
||||||
|
"pytest: reading from stdin while output is captured! Consider using `-s`."
|
||||||
|
)
|
||||||
|
|
||||||
readline = read
|
readline = read
|
||||||
readlines = read
|
readlines = read
|
||||||
|
|
Loading…
Reference in New Issue