diff options
author | Jordan Guymon <guymonj@amazon.com> | 2016-08-24 15:44:43 -0700 |
---|---|---|
committer | Jordan Guymon <guymonj@amazon.com> | 2016-08-24 16:26:34 -0700 |
commit | a152ea2dbbebb3de0f79310159bf060af07ce470 (patch) | |
tree | b9736086c26e90d806e28bea78343608fd166e2f /_pytest | |
parent | 3345ac92167fff8b251dc37ad717f79bb95b5b7d (diff) | |
download | pytest-a152ea2dbbebb3de0f79310159bf060af07ce470.tar.gz |
Add buffer attribute to stdin stub
Diffstat (limited to '_pytest')
-rw-r--r-- | _pytest/capture.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_pytest/capture.py b/_pytest/capture.py index d58c72909..9f60db6ac 100644 --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -455,6 +455,13 @@ class DontReadFromInput: def close(self): pass + @property + def buffer(self): + if sys.version_info >= (3,0): + return self + else: + raise AttributeError('redirected stdin has no attribute buffer') + def _readline_workaround(): """ |