Closed fchauvel closed 5 years ago
Your guess was correct! This was very similar to #146.
I added an encoding attribute to our wrapped sys.stdout
that mirrors the value of what we're wrapping. I tested it on your Camp application and it worked for me. The fix is in Green 2.14.2 (just released).
Works just fine now! Many thanks for the quick fix!
Works just fine now! Many thanks for the quick fix!
You're welcome! It is always nice when the solution is so straightforward. That's fairly rare in my experience. 😄
I'm currently migrating my CAMP application from Python 2.7 to Python 3.5.3 (on Debian 9) and I now get several tests that fail only when I use green (they pass if I run a
python setup.py test -s tests.generate.test_samples
.See the logs I get below using green. The output intercepted by Green shows that the z3 module (which we depend on) tried to access the 'encoding' attribute of
sys.stdout
By contrast the tests pass when I do not use green:
Looking at the past issues, I guess this somehow similar to Issue #146. As explained, the command
green -a
works as a workaround but it would be nice to be able to capture output :-)Thanks anyway.