diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2013-07-17 15:15:20 +0300 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2013-07-17 15:15:20 +0300 |
| commit | 1230a00806d6a9c0d91a32b719a0417e300554ea (patch) | |
| tree | 83116552d68d60a5a9a5e6acdd9b317865526162 /test | |
| parent | 246757e9f37266c95e9a51b478673c473f6afa2c (diff) | |
| parent | 0390e2ea086f9e8d9e2286ff1402ec1661d402e4 (diff) | |
| download | pylint-1230a00806d6a9c0d91a32b719a0417e300554ea.tar.gz | |
Merged logilab/pylint into default
Diffstat (limited to 'test')
| -rw-r--r-- | test/input/func_no_final_new_line.py | 2 | ||||
| -rw-r--r-- | test/messages/func_no_final_new_line.txt | 1 | ||||
| -rw-r--r-- | test/test_func.py | 9 | ||||
| -rw-r--r-- | test/unittest_lint.py | 8 |
4 files changed, 8 insertions, 12 deletions
diff --git a/test/input/func_no_final_new_line.py b/test/input/func_no_final_new_line.py new file mode 100644 index 0000000..a9c728d --- /dev/null +++ b/test/input/func_no_final_new_line.py @@ -0,0 +1,2 @@ +'''hop''' +__revision__ = 0
\ No newline at end of file diff --git a/test/messages/func_no_final_new_line.txt b/test/messages/func_no_final_new_line.txt new file mode 100644 index 0000000..5040aa7 --- /dev/null +++ b/test/messages/func_no_final_new_line.txt @@ -0,0 +1 @@ +C: 2: Final newline missing diff --git a/test/test_func.py b/test/test_func.py index bae4749..56bb82c 100644 --- a/test/test_func.py +++ b/test/test_func.py @@ -27,7 +27,6 @@ from logilab.common import testlib from pylint.testutils import (make_tests, LintTestUsingModule, LintTestUsingFile, cb_test_gen, linter, test_reporter) -PY26 = sys.version_info >= (2, 6) PY3K = sys.version_info >= (3, 0) # Configure paths @@ -63,19 +62,13 @@ class TestTests(testlib.TestCase): continue todo.sort() if PY3K: - rest = ['E1122', 'I0001', - # no more map - 'W0110', - # deprecated exec statement removed from py3k : - 'W0122', + rest = ['I0001', # XXX : no use case for now : 'W0402', # deprecated module 'W0403', # implicit relative import 'W0410', # __future__ import not first statement ] self.assertEqual(todo, rest) - elif PY26: - self.assertEqual(todo, ['E1122', 'I0001']) else: self.assertEqual(todo, ['I0001']) diff --git a/test/unittest_lint.py b/test/unittest_lint.py index a6706b1..a65eb01 100644 --- a/test/unittest_lint.py +++ b/test/unittest_lint.py @@ -310,10 +310,10 @@ class PyLinterTC(TestCase): linter = self.linter self.linter.error_mode() checkers = self.linter.prepare_checkers() - checker_names = tuple(c.name for c in checkers) - should_not = ('design', 'format', 'imports', 'metrics', - 'miscellaneous', 'similarities') - self.assertFalse(any(name in checker_names for name in should_not)) + checker_names = set(c.name for c in checkers) + should_not = set(('design', 'format', 'imports', 'metrics', + 'miscellaneous', 'similarities')) + self.assertSetEqual(set(), should_not & checker_names) def test_disable_similar(self): self.linter.set_option('disable', 'RP0801') |
