Esempio n. 1
0
 def test_long_length_options(self):
     long_line = '1234 56189' * 5
     parser = get_option_parser()
     (options, sources) = parser.parse_args(['-m', '49'])
     self.create_and_check('bogus', long_line, options=options)
     self.assertEqual(
         [(1, 'Line exceeds 49 characters.')],
         self.reporter.messages)
Esempio n. 2
0
 def test_long_length_options(self):
     long_line = '1234 56189' * 7 + '\n'
     parser = get_option_parser()
     (options, sources) = parser.parse_args(['-m', '60'])
     self.file.write(long_line)
     self.file.flush()
     checker = PythonChecker(
         self.file.name, long_line, self.reporter, options)
     checker.check_pep8()
     self.assertEqual(
         [(1, 'E501 line too long (70 characters)')],
         self.reporter.messages)