1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 12:06:04 +00:00

#509: Fixed correction on windows machine running other shells (#1091)

* Replaced print with sys.stdout.write

* Fixed tests

* Normalized line endings
This commit is contained in:
Divya Jain 2020-07-17 03:26:58 +05:30 committed by GitHub
parent ca46956e20
commit c196e2901c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class TestCorrectedCommand(object):
settings.update(override_settings)
CorrectedCommand(script, None, 1000).run(Command(script, ''))
out, _ = capsys.readouterr()
assert out[:-1] == printed
assert out == printed
class TestRule(object):

View File

@ -255,4 +255,4 @@ class CorrectedCommand(object):
logs.debug(u'PYTHONIOENCODING: {}'.format(
os.environ.get('PYTHONIOENCODING', '!!not-set!!')))
print(self._get_script())
sys.stdout.write(self._get_script())