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
Windows behavior fixed, with appveyor tests passing #33
Conversation
tests/test_cli.py
Outdated
def test_usage_string_fork(tmpdir, capsys): | ||
tmpdir.chdir() | ||
|
||
try: | ||
out = check_output('bumpversion --help', shell=True, stderr=subprocess.STDOUT).decode('utf-8') | ||
out = check_output('bumpversion --help', shell=True, stderr=subprocess.STDOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a universal_lines
parameter which also fixes encoding issues. Perhaps that'd remove the need for xfail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's universal_newlines
FWIW
@jeremycarroll great work, thank you! let's try to see if we can remove the need for Also: if you could clean up the commits a bit that'd be pretty sweet as well. Will merge on your indication. |
OK - I will rebase onto a new branch, with cleaner commits, and try the newlines thing ... I don't think that was it: the error was occurring because the |
This PR is replaced by a new one |
This PR fixes issues on the Windows platform, particularly python2, revealed in the appveyor test failures.
In particular, encoding when making external calls with
subprocess
was usually incorrect.Two specific changes on py2:
subprocess
calls→
) in utf-8 before making the call.A third change for both py2 and py3 is to change the file operations to text mode rather than binary mode, which simplifies handling of encoding.
In the tests, two further issues were addressed:
hg
(or presumablygit
) is absent (this issue was not visible on appveyor, but locally to me)test_usage_string_fork
changed to not explicit encode, and to use byte strings instead; xfailing in the most difficult case to fix: Windows on py3.NB: I don't have a windows machine, so I am entirely reliant on appveyor for above analysis