bito-code-review[bot] commented on PR #42357:
URL: https://github.com/apache/superset/pull/42357#issuecomment-5060597718
<!-- Bito Reply -->
The flagged issue is correct. The current test
`test_relative_offset_preserves_inner_bounds` only asserts on local variables
that are manually assigned within the test itself, rather than invoking the
production logic in `superset/models/helpers.py` (or the relevant processor) to
verify that the `inner_from_dttm` and `inner_to_dttm` are correctly set by the
system. To resolve this, the test should instantiate a `QueryObject` or call
the `processing_time_offsets` function with the appropriate parameters and
assert the resulting object's attributes.
Since there are no other comments in the provided PR comments file, there
are no additional items to address.
**tests/unit_tests/common/test_query_context_processor.py**
```
def test_relative_offset_preserves_inner_bounds():
# ... setup ...
query_object = QueryObject(from_dttm=outer_from, to_dttm=outer_to)
processing_time_offsets(query_object, offset, outer_from, outer_to)
assert query_object.inner_from_dttm == outer_from
assert query_object.inner_to_dttm == outer_to
```
--
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]