summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-11-24 16:29:58 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-11-24 16:29:58 +0100
commitb3f94e1ec919caceb1939aded81eae6bc9c9004c (patch)
tree1e067ac46fee7a02b3de1b1aa23cfa5b964a31a6
parentd5c4f0e75b337ea3d448e63d4539e3a2ccf9cfb3 (diff)
downloadpylint-git-b3f94e1ec919caceb1939aded81eae6bc9c9004c.tar.gz
py3k: fix smoketest
-rw-r--r--test/smoketest.py5
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)