Fix unwrapping stdout/stderr#117
Conversation
|
You're right, that doesn't work correctly. Although the fix is actually still a bit "wrong" as it keeps the counter at 1 once it's been incremented. Shouldn't really be a problem, but it's not as neat :P I guess when resetting the stream it should just set the counter to 0 in all cases. |
|
@wolph That was my fault... fixed. [It didn't always reset, since class is instantiated at import time.] |
18d77e5 to
a2934c2
Compare
|
Not sure what's triggering coverage that's different than master. Perhaps builds are broken there too? When are you likely to be able to ship a new release with this patch? |
|
My weekend is a bit busy but I might have time on sunday, monday at the latest :) As for the tests, I'm guessing the tests are simply broken. They worked for the old (wrong) code so with the new code they need to be changed as well: https://github.com/WoLpH/python-progressbar/blob/6ca8abf16f8b7f2ca9d958ea19a7fe8887d9d403/tests/test_stream.py |
|
@wolph It's actually not the tests that are failing... but Monday sounds great. Thanks for being so responsive! |
|
I understand, but due to the changed behaviour the |
|
I just realised as much (hitherto not used coverage). Will fix that too. |
|
Testing locally is much easier than using travis :) After that you should have a |
|
Yep... figured it out :). Just adding a test now. Thanks! |
Hi @wolph, Looks like you've got a couple of off by one errors here, which leads to the stdout/stderr not being restored appropriately.
|
I added a fairly esoteric test to |
Fixed several bugs thanks to @matthewwardrop and refactored requirements - #119 Use get_ipython imported from IPython rather than global namespace - #118 Make printing a newline on finish optional - #117 Fix unwrapping stdout/stderr - Refactored `requirements.txt` files to use `setup.py`
|
@matthewwardrop the new release is online and it seems to do the trick :) Thanks for the help! |
|
Thanks @wolph ! |
Hi @wolph,
Looks like you've got a couple of off-by-one errors here, which leads to the stdout/stderr not being restored appropriately. Causing some bugs downstream :).