Skip to content

Commit

Permalink
More of N806
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Jun 3, 2024
1 parent b755606 commit b4e44a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ ignore = [
'FBT001', # Boolean positional arg in function definition
'FBT002', # Boolean default value in function definition
'FBT003', # Boolean positional value in function call
'N806', # Variable `FType` in function should be lowercase
'N812', # Lowercase `__version_collection_doc_cache__` imported as non-lowercase `VERSION_CDC`
'N813', # Camelcase `Action` imported as lowercase `stdout_action`
'N817', # CamelCase `Constants` imported as acronym `C`
Expand Down
8 changes: 5 additions & 3 deletions tests/unit/actions/run/test_runner_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,17 @@ def test_runner_args(mocker: MockerFixture, data: Scenario) -> None:
args.entry("ansible_runner_timeout").value.current = data.timeout
args.entry("ansible_runner_write_job_events").value.current = data.write_job_events

TestRunnerException = Exception
class TestRunnerError(Exception):
"""Test runner exception."""

command_async = mocker.patch(
"ansible_navigator.actions.run.CommandAsync",
side_effect=TestRunnerException,
side_effect=TestRunnerError,
)

run = action(args=args)
run._queue = TEST_QUEUE # pylint: disable=protected-access
with pytest.raises(TestRunnerException):
with pytest.raises(TestRunnerError):
run._run_runner() # pylint: disable=protected-access

command_async.assert_called_once_with(**data.expected)

0 comments on commit b4e44a3

Please sign in to comment.