summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-01-22 00:24:43 +0200
committercpopa <devnull@localhost>2014-01-22 00:24:43 +0200
commit89132cbec80eeea0976f4ab4e8c10d44019bd934 (patch)
treeff865c300357ce3503d8a883f7689e41d800de3e
parentbaf09d25e4fe7ccb3bd49cab5d4a27c2cc97dcb4 (diff)
downloadpylint-89132cbec80eeea0976f4ab4e8c10d44019bd934.tar.gz
Fix tests for handling the fact that all style are newstyle classes in Python 3.
-rw-r--r--test/messages/func_newstyle___slots___py30.txt1
-rw-r--r--test/messages/func_newstyle_exceptions_py30.txt4
-rw-r--r--test/messages/func_newstyle_property_py30.txt1
-rw-r--r--test/messages/func_newstyle_super_py30.txt2
-rw-r--r--test/test_func.py8
5 files changed, 10 insertions, 6 deletions
diff --git a/test/messages/func_newstyle___slots___py30.txt b/test/messages/func_newstyle___slots___py30.txt
new file mode 100644
index 0000000..0db581b
--- /dev/null
+++ b/test/messages/func_newstyle___slots___py30.txt
@@ -0,0 +1 @@
+C: 10:HaNonNonNon: Old-style class defined.
diff --git a/test/messages/func_newstyle_exceptions_py30.txt b/test/messages/func_newstyle_exceptions_py30.txt
index 72166ba..ed4ba4d 100644
--- a/test/messages/func_newstyle_exceptions_py30.txt
+++ b/test/messages/func_newstyle_exceptions_py30.txt
@@ -1,5 +1,5 @@
+E: 21:fonctionBof: Raising a new style class which doesn't inherit from BaseException
E: 25:fonctionNew: Raising a new style class which doesn't inherit from BaseException
+E: 29:fonctionBof2: Raising a new style class which doesn't inherit from BaseException
E: 33:fonctionNew2: Raising a new style class which doesn't inherit from BaseException
E: 37:fonctionNotImplemented: NotImplemented raised - should raise NotImplementedError
-W: 21:fonctionBof: Exception doesn't inherit from standard "Exception" class
-W: 29:fonctionBof2: Exception doesn't inherit from standard "Exception" class
diff --git a/test/messages/func_newstyle_property_py30.txt b/test/messages/func_newstyle_property_py30.txt
new file mode 100644
index 0000000..b1d46a5
--- /dev/null
+++ b/test/messages/func_newstyle_property_py30.txt
@@ -0,0 +1 @@
+C: 14:HaNonNonNon: Old-style class defined.
diff --git a/test/messages/func_newstyle_super_py30.txt b/test/messages/func_newstyle_super_py30.txt
index 4ed306c..4a08d88 100644
--- a/test/messages/func_newstyle_super_py30.txt
+++ b/test/messages/func_newstyle_super_py30.txt
@@ -1,5 +1,3 @@
C: 5:Aaaa: Old-style class defined.
-E: 7:Aaaa.hop: Use of super on an old style class
-E: 11:Aaaa.__init__: Use of super on an old style class
E: 21:NewAaaa.__init__: Bad first argument 'object' given to super()
E: 31:Py3kWrongSuper.__init__: Bad first argument 'NewAaaa' given to super()
diff --git a/test/test_func.py b/test/test_func.py
index e8c746d..5590dc9 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -55,12 +55,16 @@ class TestTests(testlib.TestCase):
continue
todo.sort()
if PY3K:
- rest = ['I0001',
+ rest = ['E1001', # slots-on-old-class
+ 'E1002', # super-on-old-class
# XXX : no use case for now :
+ 'I0001',
'W0402', # deprecated module
'W0403', # implicit relative import
'W0410', # __future__ import not first statement
- ]
+ 'W0710', # nonstandard-exception
+ 'W1001' # property-on-old-class
+ ]
self.assertEqual(todo, rest)
else:
self.assertEqual(todo, ['I0001'])