Esempio n. 1
0
 def test_select(self):
     """selected PEP8 codes are selected"""
     errors = check_pep8(self.invalid, select=('E111',))
     assert_that(errors, has_length(3))
Esempio n. 2
0
 def test_ignore(self):
     """ignored PEP8 codes are ignored"""
     errors = check_pep8(self.invalid,
                         ignore=('E111', 'E113', 'E901'))
     assert_that(errors, has_length(0))
Esempio n. 3
0
 def test_ignore_license(self):
     """ignored PEP8 codes are ignored"""
     errors = check_pep8(self.error, ignore=('E265',))
     assert_that(errors, has_length(2))
Esempio n. 4
0
 def test_invalid_file(self):
     """invalid.py has 7 PEP8 violations + 1 from pyFlakes"""
     errors = check_pep8(self.invalid)
     assert_that(errors, has_length(8))
Esempio n. 5
0
 def test_erroneous_file(self):
     """error.py has 2 pyflakes violations"""
     errors = check_pep8(self.error)
     assert_that(errors, has_length(2))
 def test_select(self):
     """selected PEP8 codes are selected"""
     errors = check_pep8(self.invalid, select=('E111',))
     assert_that(errors, has_length(3))
Esempio n. 7
0
 def test_valid(self):
     """valid.py is correctly formatted (according to pep8)"""
     errors = check_pep8(self.valid, ignore=('E265', 'E266'))
     assert_that(errors, has_length(0))
 def test_ignore_license(self):
     """ignored PEP8 codes are ignored"""
     errors = check_pep8(self.error, ignore=('E265',))
     assert_that(errors, has_length(2))
 def test_ignore(self):
     """ignored PEP8 codes are ignored"""
     errors = check_pep8(self.invalid,
                         ignore=('E111', 'E113', 'E901'))
     assert_that(errors, has_length(0))
Esempio n. 10
0
 def test_erroneous_file(self):
     """error.py has 2 pyflakes violations"""
     errors = check_pep8(self.error)
     assert_that(errors, has_length(2))
Esempio n. 11
0
 def test_invalid_file(self):
     """invalid.py has 7 PEP8 violations + 1 from pyFlakes"""
     errors = check_pep8(self.invalid)
     assert_that(errors, has_length(8))
Esempio n. 12
0
 def test_valid(self):
     """valid.py is correctly formatted (according to pep8)"""
     errors = check_pep8(self.valid, ignore=('E265', 'E266'))
     assert_that(errors, has_length(0))