Merge pull request #6028 from blueyed/DontReadFromInput-msg

capture: improve message with DontReadFromInput's IOError
This commit is contained in:
Daniel Hahler 2019-10-23 22:48:15 +02:00 committed by GitHub
commit 8316d4392a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -696,7 +696,9 @@ class DontReadFromInput:
encoding = None
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
readlines = read