Remove extraneous pylint ignore

* Pylint issue 511 is closed, remove ignore related to that.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/83257/head
Abhijeet Kasurde 4 weeks ago
parent b70248eb22
commit 2c69d844bb

@ -165,19 +165,18 @@ class TestDetectionRegexes:
def test_no_detect_new_style_python_module_re(self, testcase):
assert not amc.NEW_STYLE_PYTHON_MODULE_RE.search(testcase)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('testcase, result', CORE_PATHS) # pylint: disable=undefined-variable
@pytest.mark.parametrize('testcase, result', CORE_PATHS)
def test_detect_core_library_path_re(self, testcase, result):
assert amc.CORE_LIBRARY_PATH_RE.search(testcase).group('path') == result
@pytest.mark.parametrize('testcase', (p[0] for p in COLLECTION_PATHS)) # pylint: disable=undefined-variable
@pytest.mark.parametrize('testcase', (p[0] for p in COLLECTION_PATHS))
def test_no_detect_core_library_path_re(self, testcase):
assert not amc.CORE_LIBRARY_PATH_RE.search(testcase)
@pytest.mark.parametrize('testcase, result', COLLECTION_PATHS) # pylint: disable=undefined-variable
@pytest.mark.parametrize('testcase, result', COLLECTION_PATHS)
def test_detect_collection_path_re(self, testcase, result):
assert amc.COLLECTION_PATH_RE.search(testcase).group('path') == result
@pytest.mark.parametrize('testcase', (p[0] for p in CORE_PATHS)) # pylint: disable=undefined-variable
@pytest.mark.parametrize('testcase', (p[0] for p in CORE_PATHS))
def test_no_detect_collection_path_re(self, testcase):
assert not amc.COLLECTION_PATH_RE.search(testcase)

@ -33,8 +33,6 @@ class TestAnsibleModuleExitJson:
{'msg': 'message', 'datetime': DATETIME.isoformat(), 'invocation': EMPTY_INVOCATION}),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
# pylint: disable=undefined-variable
@pytest.mark.parametrize('args, expected, stdin', ((a, e, {}) for a, e in DATA), indirect=['stdin'])
def test_exit_json_exits(self, am, capfd, args, expected, monkeypatch):
monkeypatch.setattr(warnings, '_global_deprecations', [])
@ -47,8 +45,6 @@ class TestAnsibleModuleExitJson:
return_val = json.loads(out)
assert return_val == expected
# Fail_json is only legal if it's called with a message
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('args, expected, stdin',
((a, e, {}) for a, e in DATA if 'msg' in a), # pylint: disable=undefined-variable
indirect=['stdin'])
@ -141,10 +137,9 @@ class TestAnsibleModuleExitValuesRemoved:
),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('am, stdin, return_val, expected',
(({'username': {}, 'password': {'no_log': True}, 'token': {'no_log': True}}, s, r, e)
for s, r, e in DATA), # pylint: disable=undefined-variable
for s, r, e in DATA),
indirect=['am', 'stdin'])
def test_exit_json_removes_values(self, am, capfd, return_val, expected, monkeypatch):
monkeypatch.setattr(warnings, '_global_deprecations', [])
@ -154,10 +149,9 @@ class TestAnsibleModuleExitValuesRemoved:
assert json.loads(out) == expected
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('am, stdin, return_val, expected',
(({'username': {}, 'password': {'no_log': True}, 'token': {'no_log': True}}, s, r, e)
for s, r, e in DATA), # pylint: disable=undefined-variable
for s, r, e in DATA),
indirect=['am', 'stdin'])
def test_fail_json_removes_values(self, am, capfd, return_val, expected, monkeypatch):
monkeypatch.setattr(warnings, '_global_deprecations', [])

@ -16,8 +16,7 @@ class TestAnsibleModuleLogSmokeTest:
DATA = DATA + [d.encode('utf-8') for d in DATA]
DATA += [b'non-utf8 :\xff: test']
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('msg, stdin', ((m, {}) for m in DATA), indirect=['stdin']) # pylint: disable=undefined-variable
@pytest.mark.parametrize('msg, stdin', ((m, {}) for m in DATA), indirect=['stdin'])
def test_smoketest_syslog(self, am, mocker, msg):
# These talk to the live daemons on the system. Need to do this to
# show that what we send doesn't cause an issue once it gets to the
@ -55,9 +54,8 @@ class TestAnsibleModuleLogSyslog:
else:
mock_syslog.assert_called_once_with(syslog.LOG_INFO, 'unittest no_log')
# pylint bug: https://github.com/PyCQA/pylint/issues/511
@pytest.mark.parametrize('msg, param, stdin',
((m, p, {}) for m, p in OUTPUT_DATA), # pylint: disable=undefined-variable
((m, p, {}) for m, p in OUTPUT_DATA),
indirect=['stdin'])
def test_output_matches(self, am, mocker, msg, param):
"""Check that log messages are sent correctly"""

@ -126,8 +126,6 @@ class TestRunCommandArgs:
('/bin/ls a " b" "c "', [b'/bin/ls', b'a', b' b', b'c '], b'/bin/ls a " b" "c "'),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
# pylint: disable=undefined-variable
@pytest.mark.parametrize('cmd, expected, shell, stdin',
((arg, cmd_str if sh else cmd_lst, sh, {})
for (arg, cmd_lst, cmd_str), sh in product(ARGS_DATA, (True, False))),

@ -57,8 +57,6 @@ class TestAnsibleModuleTmpDir:
),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
# pylint: disable=undefined-variable
@pytest.mark.parametrize('args, expected, stat_exists', ((s, e, t) for s, t, e in DATA))
def test_tmpdir_property(self, monkeypatch, args, expected, stat_exists):
makedirs = {'called': False}

@ -198,8 +198,6 @@ class TestConnectionPSRP(object):
),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
# pylint: disable=undefined-variable
@pytest.mark.parametrize('options, expected',
((o, e) for o, e in OPTIONS_DATA))
def test_set_options(self, options, expected):

@ -199,8 +199,6 @@ class TestConnectionWinRM(object):
),
)
# pylint bug: https://github.com/PyCQA/pylint/issues/511
# pylint: disable=undefined-variable
@pytest.mark.parametrize('options, direct, expected, kerb',
((o, d, e, k) for o, d, e, k in OPTIONS_DATA))
def test_set_options(self, options, direct, expected, kerb):

Loading…
Cancel
Save