summaryrefslogtreecommitdiff
path: root/test/unittest_reporting.py
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-07-26 17:11:14 +0200
committerTorsten Marek <shlomme@gmail.com>2014-07-26 17:11:14 +0200
commitd1448a7e57738393a9b51d890e4cd5f163997f52 (patch)
tree3a297759ab17b823b769784dea7d2c758d1af0c6 /test/unittest_reporting.py
parent30793941b79daaeb7368c87eea35614254b65ddd (diff)
downloadpylint-d1448a7e57738393a9b51d890e4cd5f163997f52.tar.gz
Remove dependency on logilab.testlib in the test suite (also removes Python 2.5 compatibility).
Diffstat (limited to 'test/unittest_reporting.py')
-rw-r--r--test/unittest_reporting.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/unittest_reporting.py b/test/unittest_reporting.py
index e1cf161..58fcf6b 100644
--- a/test/unittest_reporting.py
+++ b/test/unittest_reporting.py
@@ -11,12 +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
-from cStringIO import StringIO
+import unittest
-from logilab.common.testlib import TestCase, unittest_main
from pylint.lint import PyLinter
from pylint import checkers
@@ -25,7 +24,7 @@ from pylint.reporters.text import TextReporter
HERE = abspath(dirname(__file__))
INPUTDIR = join(HERE, 'input')
-class PyLinterTC(TestCase):
+class PyLinterTC(unittest.TestCase):
def setUp(self):
self.linter = PyLinter(reporter=TextReporter())
@@ -36,7 +35,7 @@ class PyLinterTC(TestCase):
os.environ.pop('PYLINTRC', None)
def test_template_option(self):
- output = StringIO()
+ output = cStringIO.StringIO()
self.linter.reporter.set_output(output)
self.linter.set_option('msg-template', '{msg_id}:{line:03d}')
self.linter.open()
@@ -50,4 +49,4 @@ class PyLinterTC(TestCase):
if __name__ == '__main__':
- unittest_main()
+ unittest.main()