summaryrefslogtreecommitdiff
path: root/test/test_func.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-11 11:49:21 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-11 11:49:21 +0200
commitde481e52f9f10c10a9ee5510ef0316ab5384e2e1 (patch)
tree5bd27c8cc445611bc5e249a8cc6b70783e26c116 /test/test_func.py
parentf504cfc9275820081f9dfdf3693b4854f8140d76 (diff)
downloadpylint-de481e52f9f10c10a9ee5510ef0316ab5384e2e1.tar.gz
apply emile's patch, fix test with python>=2.6
Diffstat (limited to 'test/test_func.py')
-rw-r--r--test/test_func.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_func.py b/test/test_func.py
index 2d67824..249ca86 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -38,8 +38,7 @@ checkers.initialize(linter)
linter.global_set_option('required-attributes', ('__revision__',))
PY23 = sys.version_info >= (2, 3)
-PY24 = sys.version_info >= (2, 4)
-PY25 = sys.version_info >= (2, 5)
+PY26 = sys.version_info >= (2, 6)
if linesep != '\n':
@@ -135,8 +134,8 @@ class TestTests(testlib.TestCase):
except ValueError:
continue
todo.sort()
- if PY25:
- self.assertEqual(todo, ['E0503', 'I0001'])
+ if PY26:
+ self.assertEqual(todo, ['E0503', 'E1122', 'I0001'])
elif PY23:
self.assertEqual(todo, ['E0503', 'I0001'])
else: # python < 2.3
@@ -177,6 +176,10 @@ def make_tests(filter_rgx):
if pyrestr.isdigit(): # '24', '25'...
if sys.version_info < tuple([int(i) for i in pyrestr]):
continue
+ if pyrestr.startswith('_') and pyrestr[1:].isdigit():
+ # skip test for higher python versions
+ if sys.version_info >= ( int(pyrestr[1]), int(pyrestr[2]) ):
+ continue
if not is_to_run(module_file):
continue
base = module_file.replace('func_', '').replace('.py', '')