mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test. * Enable pylint suppressed-message test. * Enable pylint redundant-unittest-assert test. * Enable pylint bad-open-mode test. * Enable pylint signature-differs test. * Enable pylint unnecessary-pass test. * Enable pylint unnecessary-lambda test. * Enable pylint raising-bad-type test. * Enable pylint logging-not-lazy test. * Enable pylint logging-format-interpolation test. * Enable pylint useless-else-on-loop test.
This commit is contained in:
@@ -106,7 +106,7 @@ class TestManager(unittest.TestCase):
|
||||
params = NONE_PARAMS.copy()
|
||||
del params['vdirect_ip']
|
||||
vdirect_file.VdirectFile(params)
|
||||
self.assertFalse("KeyError was not thrown for missing parameter")
|
||||
self.fail("KeyError was not thrown for missing parameter")
|
||||
except KeyError:
|
||||
assert True
|
||||
|
||||
@@ -134,7 +134,7 @@ class TestManager(unittest.TestCase):
|
||||
file = vdirect_file.VdirectFile(NONE_PARAMS)
|
||||
try:
|
||||
file.upload("missing_file.vm")
|
||||
self.assertFalse("IOException was not thrown for missing file")
|
||||
self.fail("IOException was not thrown for missing file")
|
||||
except IOError:
|
||||
assert True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user