diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-24 16:29:58 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-24 16:29:58 +0100 |
commit | b3f94e1ec919caceb1939aded81eae6bc9c9004c (patch) | |
tree | 1e067ac46fee7a02b3de1b1aa23cfa5b964a31a6 | |
parent | d5c4f0e75b337ea3d448e63d4539e3a2ccf9cfb3 (diff) | |
download | pylint-git-b3f94e1ec919caceb1939aded81eae6bc9c9004c.tar.gz |
py3k: fix smoketest
-rw-r--r-- | test/smoketest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/smoketest.py b/test/smoketest.py index 486704d9a..9e6a23354 100644 --- a/test/smoketest.py +++ b/test/smoketest.py @@ -109,7 +109,10 @@ class RunTC(TestCase): #This test reproduces bug #48066 ; it happens when stdout is redirected # through '>' : the sys.stdout.encoding becomes then None, and if the # output contains non ascii, pylint will crash - strio = tempfile.TemporaryFile() + if sys.version_info < (3, 0): + strio = tempfile.TemporaryFile() + else: + strio = StringIO() assert strio.encoding is None self._runtest([join(HERE, 'regrtest_data/no_stdout_encoding.py')], out=strio) |