diff options
author | Fabrice Douchant <Fabrice.Douchant@logilab.fr> | 2008-10-17 15:52:13 +0200 |
---|---|---|
committer | Fabrice Douchant <Fabrice.Douchant@logilab.fr> | 2008-10-17 15:52:13 +0200 |
commit | c07e2ab2804ae24c52f790e1e4c26a37b324cc29 (patch) | |
tree | 40545eaa55a0de0e36cd87e677c191f603039e13 /testlib.py | |
parent | 07818f75e913b3f26aa719f6ef1b8b501d4b4c84 (diff) | |
download | logilab-common-c07e2ab2804ae24c52f790e1e4c26a37b324cc29.tar.gz |
bugfix when trying to print into consol not supported UTF-8 caracters (seems wired so)
Diffstat (limited to 'testlib.py')
-rw-r--r-- | testlib.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -409,7 +409,6 @@ class SkipAwareTestResult(unittest._TextTestResult): def printErrorList(self, flavour, errors): for (_, descr), (test, err) in zip(self.descrs_for(flavour), errors): - #print 'HERRRRRE', type(self.stream) if PYGMENTS_FOUND and isatty(self.stream): err = highlight(err, lexers.PythonLexer(), formatters.terminal.TerminalFormatter()) @@ -421,7 +420,7 @@ class SkipAwareTestResult(unittest._TextTestResult): self.stream.writeln("%s: %s" % (flavour, descr)) self.stream.writeln(self.separator2) - self.stream.writeln(str(err)) + self.stream.writeln("%s" % err.encode(sys.stdout.encoding, 'replace')) try: output, errput = test.captured_output() except AttributeError: |