gemini-code-assist[bot] commented on code in PR #50:
URL: https://github.com/apache/tvm-ffi/pull/50#discussion_r2373402740
##########
tests/python/test_container.py:
##########
@@ -28,6 +28,7 @@ def test_array() -> None:
assert len(a) == 3
assert a[-1] == 3
a_slice = a[-3:-1]
+ assert isinstance(a_slice, list) # TVM array slicing returns a list[T]
instead of Array[T]
assert (a_slice[0], a_slice[1]) == (1, 2)
Review Comment:

The new assertion to check the type of the slice is a great addition for
ensuring backward compatibility. To make this test more robust and readable,
I'd suggest two minor improvements:
1. Instead of checking individual elements, you can assert the equality of
the entire sliced list. This is more concise and also verifies the length of
the slice implicitly.
2. The inline comment is a bit long. Moving it to its own line above the
assertion would improve readability, following common style practices.
```suggestion
# TVM array slicing returns a list[T] instead of Array[T]
assert isinstance(a_slice, list)
assert a_slice == [1, 2]
```
--
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]