#398 & #408: Support non-ascii IO in Python 2

This commit is contained in:
Pablo Santiago Blum de Aguiar
2015-11-04 23:08:13 -02:00
parent ad3db4ac67
commit fc05364233
14 changed files with 129 additions and 55 deletions
+8
View File
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
from subprocess import PIPE
from mock import Mock
from pathlib import Path
@@ -19,6 +21,12 @@ class TestCorrectedCommand(object):
assert {CorrectedCommand('ls', None, 100),
CorrectedCommand('ls', None, 200)} == {CorrectedCommand('ls')}
def test_representable(self):
assert '{}'.format(CorrectedCommand('ls', None, 100)) == \
'CorrectedCommand(script=ls, side_effect=None, priority=100)'
assert u'{}'.format(CorrectedCommand(u'echo café', None, 100)) == \
u'CorrectedCommand(script=echo café, side_effect=None, priority=100)'
class TestRule(object):
def test_from_path(self, mocker):