From 0ed61a71b1756e204cd57d3711c7f4d0b90ebef2 Mon Sep 17 00:00:00 2001 From: Torsten Marek Date: Sun, 9 Nov 2014 10:33:29 +0100 Subject: Make most tests run unmodified under Python 3.4. --- test/unittest_reporting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unittest_reporting.py') diff --git a/test/unittest_reporting.py b/test/unittest_reporting.py index 88fb288de..ef1de0c64 100644 --- a/test/unittest_reporting.py +++ b/test/unittest_reporting.py @@ -11,11 +11,11 @@ # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -import cStringIO import os from os.path import join, dirname, abspath import unittest +import six from pylint.lint import PyLinter from pylint import checkers @@ -35,7 +35,7 @@ class PyLinterTC(unittest.TestCase): os.environ.pop('PYLINTRC', None) def test_template_option(self): - output = cStringIO.StringIO() + output = six.StringIO() self.linter.reporter.set_output(output) self.linter.set_option('msg-template', '{msg_id}:{line:03d}') self.linter.open() @@ -48,7 +48,7 @@ class PyLinterTC(unittest.TestCase): 'C0301:002\n') def test_parseable_output_regression(self): - output = cStringIO.StringIO() + output = six.StringIO() linter = PyLinter(reporter=ParseableTextReporter()) checkers.initialize(linter) linter.config.persistent = 0 -- cgit v1.2.1