Fix py33, make sure skip_on_py3 is part of every check

Reorder skip_on_py3 check in test_doctest so even py27 tests will make
sure skip_on_py3 is defined.

Add skip_on_py3 to base GlobalCheck

Change-Id: I62cd07cf00acde9e0ee19f045358dc3861a918ad
This commit is contained in:
Joe Gordon 2014-04-24 18:54:42 -07:00
parent b93416838d
commit aba58c846c
2 changed files with 2 additions and 1 deletions

View File

@ -101,6 +101,7 @@ class GlobalCheck(object):
name = None
version = '0.0.1'
skip_on_py3 = False
_has_run = set()
def __init__(self, tree, *args):

View File

@ -79,7 +79,7 @@ def load_tests(loader, tests, pattern):
continue
check = entry.load()
name = entry.attrs[0]
if six.PY3 and check.skip_on_py3:
if check.skip_on_py3 and six.PY3:
continue
for (lineno, (raw, (code, source))) in enumerate(_get_lines(check)):
lines = [part.replace(r'\t', '\t') + '\n'