Skip to content

Commit

Permalink
Merge 1961de7 into 30dd967
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed Jun 27, 2022
2 parents 30dd967 + 1961de7 commit 7cebf24
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pylint_odoo/test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,16 @@ def fstring_no_sqli(self):
real_errors = pylint_res.linter.stats.by_msg
self.assertDictEqual(real_errors, {'sql-injection': 4})

def test_150_check_only_enabled_one_check(self):
"""Checking -d all -e ONLY-ONE-CHECK"""
disable = '--disable=all'
for expected_error_name, expected_error_value in EXPECTED_ERRORS.items():
enable = '--enable=%s' % expected_error_name
pylint_res = self.run_pylint(self.paths_modules, [disable, enable])
real_errors = pylint_res.linter.stats.by_msg
expected_errors = {expected_error_name: expected_error_value}
self.assertDictEqual(real_errors, expected_errors)


if __name__ == '__main__':
unittest.main()

0 comments on commit 7cebf24

Please sign in to comment.