Esempio n. 1
0
    def test_parse_errors(self):
        test_string = '''
src/linters/pylint.py:10: [E302] expected 2 blank lines, found 1
tests/linters/pylint.py:42: [E302] expected 2 blank lines, found 1
'''
        result = pylint.parse(test_string)
        self.assertEqual(2, len(result))

        self.assertIn(
            Problem('src/linters/pylint.py', 10,
                    '[E302] expected 2 blank lines, found 1'), result)

        self.assertIn(
            Problem('tests/linters/pylint.py', 42,
                    '[E302] expected 2 blank lines, found 1'), result)
Esempio n. 2
0
    def test_parse_errors(self):
        test_string = '''
src/linters/pylint.py:10: [E302] expected 2 blank lines, found 1
tests/linters/pylint.py:42: [E302] expected 2 blank lines, found 1
'''
        result = pylint.parse(test_string)
        self.assertEqual(2, len(result))

        self.assertIn(Problem('src/linters/pylint.py',
                              10,
                              '[E302] expected 2 blank lines, found 1'),
                      result)

        self.assertIn(Problem('tests/linters/pylint.py',
                              42,
                              '[E302] expected 2 blank lines, found 1'),
                      result)
Esempio n. 3
0
 def test_empty_parse(self):
     self.assertEqual(set(), pylint.parse(''))
Esempio n. 4
0
 def test_empty_parse(self):
     self.assertEqual(set(), pylint.parse(''))