Skip to content

Commit 7275ada

Browse files
committed
SIM300 - Yoda condition detected
1 parent 18348d0 commit 7275ada

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/pytest/_cli_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def invoke_cli_app(self, parsed_cli_args: Namespace) -> ReturnCodeType:
6767
[CustomCmdStub()],
6868
)
6969

70-
assert ReturnCode.ERROR == invoke_cli_app(['sentinel'])
70+
assert invoke_cli_app(['sentinel']) == ReturnCode.ERROR
7171

7272
captured_outputs = capsys.readouterr()
7373
assert captured_outputs.err == f'{expected_stderr !s}\n'

tests/pytest/terraform_docs_replace_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_control_flow_positive(
8484
check_call_mock,
8585
)
8686

87-
assert ReturnCode.OK == invoke_cli_app(parsed_cli_args)
87+
assert invoke_cli_app(parsed_cli_args) == ReturnCode.OK
8888

8989
executed_commands = [
9090
cmd for ((cmd,), _shell) in check_call_mock.call_args_list
@@ -119,6 +119,6 @@ def test_control_flow_negative(
119119
check_call_mock,
120120
)
121121

122-
assert ReturnCode.ERROR == invoke_cli_app(parsed_cli_args)
122+
assert invoke_cli_app(parsed_cli_args) == ReturnCode.ERROR
123123

124124
check_call_mock.assert_called_once_with(expected_cmd, shell=True)

0 commit comments

Comments
 (0)