summaryrefslogtreecommitdiff
path: root/pylint/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/test/functional')
-rw-r--r--pylint/test/functional/super_checks.py2
-rw-r--r--pylint/test/functional/super_checks.txt27
-rw-r--r--pylint/test/functional/syntax_error.txt2
-rw-r--r--pylint/test/functional/unknown_encoding_py29.txt2
-rw-r--r--pylint/test/functional/wrong_import_position.py16
-rw-r--r--pylint/test/functional/wrong_import_position.txt6
6 files changed, 34 insertions, 21 deletions
diff --git a/pylint/test/functional/super_checks.py b/pylint/test/functional/super_checks.py
index 14fd5a2..f4aec0a 100644
--- a/pylint/test/functional/super_checks.py
+++ b/pylint/test/functional/super_checks.py
@@ -65,9 +65,9 @@ class SuperDifferentScope(object):
class UnknownBases(Missing):
"""Don't emit if we don't know all the bases."""
def __init__(self):
- # pylint: disable=super-on-old-class
super(UnknownBases, self).__init__()
super(UnknownBases, self).test()
+ super(Missing, self).test() # [bad-super-call]
# Test that we are detecting proper super errors.
diff --git a/pylint/test/functional/super_checks.txt b/pylint/test/functional/super_checks.txt
index a98a25b..ea1d67b 100644
--- a/pylint/test/functional/super_checks.txt
+++ b/pylint/test/functional/super_checks.txt
@@ -1,18 +1,19 @@
old-style-class:6:Aaaa:Old-style class defined.
-super-on-old-class:8:Aaaa.hop:Use of super on an old style class:INFERENCE
+super-on-old-class:8:Aaaa.hop:Use of super on an old style class
no-member:10:Aaaa.hop:Super of 'Aaaa' has no 'hop' member:INFERENCE
-super-on-old-class:12:Aaaa.__init__:Use of super on an old style class:INFERENCE
+super-on-old-class:12:Aaaa.__init__:Use of super on an old style class
no-member:19:NewAaaa.hop:Super of 'NewAaaa' has no 'hop' member:INFERENCE
-bad-super-call:22:NewAaaa.__init__:Bad first argument 'Aaaa' given to super():INFERENCE
-missing-super-argument:27:Py3kAaaa.__init__:Missing argument to super():INFERENCE
-bad-super-call:32:Py3kWrongSuper.__init__:Bad first argument 'NewAaaa' given to super():INFERENCE
-bad-super-call:37:WrongNameRegression.__init__:Bad first argument 'Missing' given to super():INFERENCE
-bad-super-call:46:CrashSuper.__init__:Bad first argument 'NewAaaa' given to super():INFERENCE
-bad-super-call:62:SuperDifferentScope.test:Bad first argument 'object' given to super():INFERENCE
-not-callable:89:InvalidSuperChecks.__init__:super(InvalidSuperChecks, self).not_a_method is not callable:HIGH
+bad-super-call:22:NewAaaa.__init__:Bad first argument 'Aaaa' given to super()
+missing-super-argument:27:Py3kAaaa.__init__:Missing argument to super()
+bad-super-call:32:Py3kWrongSuper.__init__:Bad first argument 'NewAaaa' given to super()
+bad-super-call:37:WrongNameRegression.__init__:Bad first argument 'Missing' given to super()
+bad-super-call:46:CrashSuper.__init__:Bad first argument 'NewAaaa' given to super()
+bad-super-call:62:SuperDifferentScope.test:Bad first argument 'object' given to super()
+bad-super-call:70:UnknownBases.__init__:Bad first argument 'Missing' given to super()
+not-callable:89:InvalidSuperChecks.__init__:super(InvalidSuperChecks, self).not_a_method is not callable
no-member:90:InvalidSuperChecks.__init__:Super of 'InvalidSuperChecks' has no 'attribute_error' member:INFERENCE
-no-value-for-parameter:92:InvalidSuperChecks.__init__:No value for argument 'param' in method call:HIGH
-too-many-function-args:93:InvalidSuperChecks.__init__:Too many positional arguments for method call:HIGH
-no-value-for-parameter:95:InvalidSuperChecks.__init__:No value for argument 'param' in method call:HIGH
-unexpected-keyword-arg:95:InvalidSuperChecks.__init__:Unexpected keyword argument 'lala' in method call:HIGH
+no-value-for-parameter:92:InvalidSuperChecks.__init__:No value for argument 'param' in method call
+too-many-function-args:93:InvalidSuperChecks.__init__:Too many positional arguments for method call
+no-value-for-parameter:95:InvalidSuperChecks.__init__:No value for argument 'param' in method call
+unexpected-keyword-arg:95:InvalidSuperChecks.__init__:Unexpected keyword argument 'lala' in method call
no-member:98:InvalidSuperChecks.__init__:Super of 'InvalidSuperChecks' has no 'attribute_error' member:INFERENCE \ No newline at end of file
diff --git a/pylint/test/functional/syntax_error.txt b/pylint/test/functional/syntax_error.txt
index b57bc72..76abba8 100644
--- a/pylint/test/functional/syntax_error.txt
+++ b/pylint/test/functional/syntax_error.txt
@@ -1 +1 @@
-syntax-error:1::invalid syntax \ No newline at end of file
+syntax-error:1::invalid syntax (<string>, line 1) \ No newline at end of file
diff --git a/pylint/test/functional/unknown_encoding_py29.txt b/pylint/test/functional/unknown_encoding_py29.txt
index 588b3bf..20e7757 100644
--- a/pylint/test/functional/unknown_encoding_py29.txt
+++ b/pylint/test/functional/unknown_encoding_py29.txt
@@ -1 +1 @@
-syntax-error:1::"unknown encoding: IBO-8859-1"
+syntax-error:1::"unknown encoding: IBO-8859-1 (<string>, line 0)"
diff --git a/pylint/test/functional/wrong_import_position.py b/pylint/test/functional/wrong_import_position.py
index 1547ff2..269d757 100644
--- a/pylint/test/functional/wrong_import_position.py
+++ b/pylint/test/functional/wrong_import_position.py
@@ -1,13 +1,25 @@
"""Checks import order rule"""
# pylint: disable=unused-import,relative-import,ungrouped-imports,wrong-import-order,using-constant-test
-# pylint: disable=import-error
+# pylint: disable=import-error, too-few-public-methods, missing-docstring
import os.path
+
if True:
from astroid import are_exclusive
try:
import sys
except ImportError:
- import datetime
+ class Myclass(object):
+ """docstring"""
+
+if sys.version_info[0] == 3:
+ from collections import OrderedDict
+else:
+ class OrderedDict(object):
+ """Nothing to see here."""
+ def some_func(self):
+ pass
+
+import six
CONSTANT = True
diff --git a/pylint/test/functional/wrong_import_position.txt b/pylint/test/functional/wrong_import_position.txt
index 2f417e4..5cde17d 100644
--- a/pylint/test/functional/wrong_import_position.txt
+++ b/pylint/test/functional/wrong_import_position.txt
@@ -1,3 +1,3 @@
-wrong-import-position:14::Import "import datetime" should be placed at the top of the module
-wrong-import-position:20::Import "import scipy" should be placed at the top of the module
-wrong-import-position:21::Import "import astroid" should be placed at the top of the module
+wrong-import-position:26::Import "import datetime" should be placed at the top of the module
+wrong-import-position:32::Import "import scipy" should be placed at the top of the module
+wrong-import-position:33::Import "import astroid" should be placed at the top of the module