mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-24 04:32:46 +00:00
add pep8 tests and fix lexical indentation for python3
These are the pep8 tests that break python3, such as mixing tabs and spaces for indentation. I ignored all the pep8 tests that seemed only stylistic, such as "visual" indentation. http://docs.python.org/3.3/reference/lexical_analysis.html
This commit is contained in:
parent
7846ee875d
commit
1597d7956a
11 changed files with 88 additions and 79 deletions
2
setup.py
2
setup.py
|
@ -50,7 +50,7 @@ setup(
|
|||
'Intended Audience :: Information Technology',
|
||||
'Programming Language :: Python'
|
||||
],
|
||||
# test_suite = 'nose.collector',
|
||||
#test_suite = 'nose.collector',
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ from tempfile import mkdtemp
|
|||
from tito.common import *
|
||||
from tito.common import scl_to_rpm_option, get_latest_tagged_version, \
|
||||
find_wrote_in_rpmbuild_output
|
||||
from tito.compat import *
|
||||
from tito.exception import RunCommandException
|
||||
from tito.release import *
|
||||
from tito.exception import TitoException
|
||||
|
|
|
@ -32,12 +32,20 @@ class TestPep8(TitoUnitTestFixture):
|
|||
def test_conformance(self):
|
||||
tests = [
|
||||
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes
|
||||
'E101', # indentation contains mixed spaces and tabs
|
||||
'E111', # indentation is not a multiple of four
|
||||
'E112', # expected an indented block
|
||||
'E113', # unexpected indentation
|
||||
'E121', # continuation line indentation is not a multiple of four
|
||||
'E122', # continuation line missing indentation or outdented
|
||||
'E126', # continuation line over-indented for hanging indent
|
||||
'E2', # whitespace errors
|
||||
'E3', # blank line errors
|
||||
'E4', # import errors
|
||||
'E502', # the backslash is redundant between brackets
|
||||
'E7', # statement errors
|
||||
'E9', # runtime errors (SyntaxError, IndentationError, IOError)
|
||||
'W1', # indentation warnings
|
||||
'W2', # whitespace warnings
|
||||
'W3', # blank line warnings
|
||||
'W6', # deprecated features
|
||||
|
|
Loading…
Add table
Reference in a new issue