Skip to content

Add buffer attribute to DontReadFromInput#1866

Merged
RonnyPfannschmidt merged 1 commit intopytest-dev:masterfrom
joguSD:bugfix-stdin-stub-buffer
Aug 25, 2016
Merged

Add buffer attribute to DontReadFromInput#1866
RonnyPfannschmidt merged 1 commit intopytest-dev:masterfrom
joguSD:bugfix-stdin-stub-buffer

Conversation

@joguSD
Copy link
Copy Markdown
Contributor

@joguSD joguSD commented Aug 24, 2016

Python 3 added a buffer attribute to sys.stdin. Simply accessing this attribute doesn't imply the program has read from stdin, as such this attribute should behave similarly to the stubbed input presently. This PR will add this property and return self such that attempting to read the buffer will raise exceptions the same as had you read from stdin.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.008%) to 93.027% when pulling a152ea2 on joguSD:bugfix-stdin-stub-buffer into 3345ac9 on pytest-dev:master.

@RonnyPfannschmidt
Copy link
Copy Markdown
Member

Well done

@RonnyPfannschmidt RonnyPfannschmidt merged commit 9c45d6c into pytest-dev:master Aug 25, 2016
@nicoddemus
Copy link
Copy Markdown
Member

That should have gone to features I think...

@The-Compiler
Copy link
Copy Markdown
Member

I wondered about that as well - but to be fair, pytest patching sys.stdin with something which is different from what python does can count as a bug.

@nicoddemus
Copy link
Copy Markdown
Member

Fair enough. 😁

@joguSD
Copy link
Copy Markdown
Contributor Author

joguSD commented Aug 25, 2016

Thanks for the quick response! I'm not too familiar with Pytest's release cadence, is there an ETA on when this patch version will go out?

@nicoddemus
Copy link
Copy Markdown
Member

We have a few regressions to fix but they shouldn't take long, so I would say sometime next week we could have a 3.0.2 release.

@joguSD
Copy link
Copy Markdown
Contributor Author

joguSD commented Aug 25, 2016

Perfect, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants