Skip to content

Commit 8c45570

Browse files
author
Nils Berg
committed
set some options to avoid test errors on Python2.6 due to changes between pylint 1.3 and 1.4+
1 parent 9acfea3 commit 8c45570

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_func.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
import os
3+
import sys
34
import unittest
45
from django.conf import settings
56
from pylint.testutils import make_tests, LintTestUsingFile, cb_test_gen, linter
@@ -12,6 +13,11 @@
1213

1314

1415
linter.load_plugin_modules(['pylint_django'])
16+
# Disable some things on Python2.6, since we use a different pylint version here
17+
# (1.3 on Python2.6, 1.4+ on later versions)
18+
if sys.version_info < (2, 7):
19+
linter.global_set_option('required-attributes', ())
20+
linter.global_set_option('disable', ('E0012',))
1521

1622

1723
def module_exists(module_name):

0 commit comments

Comments
 (0)