diff options
author | Torsten Marek <shlomme@gmail.com> | 2014-07-26 17:11:14 +0200 |
---|---|---|
committer | Torsten Marek <shlomme@gmail.com> | 2014-07-26 17:11:14 +0200 |
commit | 97006fcc02e1035c6b5c680e4f07b7e58fb14a12 (patch) | |
tree | 773da6bbbd64430a127fd3d79ba5e2835ac2be1e /test/unittest_checker_format.py | |
parent | fc7f9b8e0526f4ca9eb525479180843cc612bd1d (diff) | |
download | pylint-git-97006fcc02e1035c6b5c680e4f07b7e58fb14a12.tar.gz |
Remove dependency on logilab.testlib in the test suite (also removes Python 2.5 compatibility).
Diffstat (limited to 'test/unittest_checker_format.py')
-rw-r--r-- | test/unittest_checker_format.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/unittest_checker_format.py b/test/unittest_checker_format.py index 82b079a55..1f31e28cc 100644 --- a/test/unittest_checker_format.py +++ b/test/unittest_checker_format.py @@ -15,15 +15,14 @@ Check format checker helper functions """ -from __future__ import with_statement - -import sys -import re +from __future__ import unicode_literals +import io from os import linesep +import re +import sys import tokenize -import StringIO -from logilab.common.testlib import TestCase, unittest_main + from astroid import test_utils from pylint.checkers.format import * @@ -32,7 +31,7 @@ from pylint.testutils import CheckerTestCase, Message, set_config def tokenize_str(code): - return list(tokenize.generate_tokens(StringIO.StringIO(code).readline)) + return list(tokenize.generate_tokens(io.StringIO(code).readline)) class MultiStatementLineTest(CheckerTestCase): @@ -255,4 +254,4 @@ class CheckSpaceTest(CheckerTestCase): if __name__ == '__main__': - unittest_main() + unittest.main() |