Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buffer attribute to DontReadFromInput #1866

Merged

Conversation

joguSD
Copy link
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

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
Member

Well done

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

That should have gone to features I think...

@The-Compiler
Copy link
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
Member

Fair enough. 😁

@joguSD
Copy link
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
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
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