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

Already on GitHub? Sign in to your account

Use default encoding (including in cram tests) fix for GH-41 #42

Merged
merged 8 commits into from Jun 12, 2012

Conversation

Projects
None yet
2 participants
Contributor

oscarbenjamin commented May 30, 2012

This pull request changes so that opster uses the default system encodings for arguments and output unless instructed otherwise by the env vars OPSTER_ARG_ENCODING or OPSTER_OUT_ENCODING. These env vars are then used in the test suite where appropriate to ensure that the tests use the expected encoding.

It turns out that the reason my systems were unable to encode the output from some of the opster tests was in fact because cram was setting LANG=C. This has been changed by using the --preserve-env option to cram. I can then get all the tests to pass on linux and windows without special casing any encodings and replacing them with 'utf-8'.

Contributor

oscarbenjamin commented May 31, 2012

This patch has been tested with Python 2.7 and 3.2 on both Windows and Ubuntu. All tests pass.

Owner

piranha commented May 31, 2012

Thanks a lot, I'll review it soon, was busy with day job too much last days. :)

piranha added a commit that referenced this pull request Jun 12, 2012

Merge pull request #42 from oscarbenjamin/unicode-option
Use default encoding (including in cram tests) fix for GH-41

@piranha piranha merged commit afdae3f into piranha:master Jun 12, 2012

Owner

piranha commented Jun 12, 2012

Sorry that it took so long for me to review/merge, everything seems ok - I hope to release 4.0 soon. Maybe after writing some more documentation. :)

@piranha piranha referenced this pull request Jun 12, 2012

Closed

opster, unicode and utf-8 #41

Contributor

oscarbenjamin commented Jun 12, 2012

No worries. Thanks for merging it.

This was referenced Jun 12, 2012

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