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 missing truncate() call on BytesIO object #52
Conversation
one, additional data were dumped. This was because BytesIO object had the longer length; calling truncate() on the BytesIO object solves this problem
I don't know why travis build is failing on 3.7 output from my own py.test:
|
Thank you so much for your contribution. I have no idea on why this is failing but I'm sure I've seen the error before, and I am still not able to reproduce it. |
@toudi are you actively using mocket? If so, in which way? Feel free to point me to a public repo, if this is the case. |
@mindflayer I am writing unit tests for websocket library => https://github.com/wildfoundry/dataplicity-lomond how can I download new version from pypi ? |
You mean you'd like to install a new version with your patch? |
well, I thought this was the whole point of patching code :D otherwise I would have to point tox / pytest to github repo |
It is and I really appreciated that, but please give me the time to actually do it. I'm working at it while I'm attending DjangoCon. :P
|
lol, no problem ;) |
When subsequent payload to be pushed by mocket was shorter than previous one, additional data were dumped. This was because BytesIO object had longer length; calling truncate() on the BytesIO object solves this problem
code to reproduce the problem, before this patch:
then, when one would use socket object, and call
recv
on it, one would get part of the first payload with the second call