bito-code-review[bot] commented on code in PR #42816:
URL: https://github.com/apache/superset/pull/42816#discussion_r3731795282
##########
tests/unit_tests/utils/webdriver_test.py:
##########
@@ -918,9 +918,9 @@ def test_spinner_timeout_logs_warning_and_raises(
assert "terminal_reason=readiness_timeout" in warning_call.args[0]
assert warning_call.args[1] == "http://example.com"
assert warning_call.args[3] == 1 # mounted holders
- assert warning_call.args[4] == 0 # ready holders
- assert warning_call.args[7] == 60
- assert warning_call.args[9] == [{"chartId": "42", "state":
"nothing_mounted"}]
+ assert warning_call.args[9] == 1 # unready holders
+ assert warning_call.args[16] == [{"chartId": "42", "state":
"nothing_mounted"}]
+ assert warning_call.args[17] == [{"chartId": "42", "state":
"nothing_mounted"}]
Review Comment:
<!-- Bito Reply -->
The suggestion to avoid this type of review comment is noted. Based on the
provided context, the assertion that `warning_call.args[17]` is out-of-bounds
appears to be a false positive, as the test suite confirms the argument index
is valid for the current implementation.
##########
tests/unit_tests/utils/webdriver_test.py:
##########
@@ -1856,8 +1856,8 @@ def test_unready_diagnostics_logged_early_and_at_failure(
diagnostics,
)
failure_args = mock_logger.warning.call_args.args
- assert failure_args[9] == diagnostics
- assert failure_args[10] == diagnostics
+ assert failure_args[16] == diagnostics
+ assert failure_args[17] == diagnostics
Review Comment:
<!-- Bito Reply -->
The suggestion is based on an incorrect assumption about the number of
arguments passed to the logger. Since the format string is the first argument,
the subsequent 17 arguments are correctly accessed at indices 1 through 17,
making the array access valid in this context.
**tests/unit_tests/utils/webdriver_test.py**
```
failure_args = mock_logger.warning.call_args.args
assert failure_args[16] == diagnostics
assert failure_args[17] == diagnostics
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]