Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ def _test_array_recode(array_with_index_and_table):
# XXX(leon): we don't yet support native qdb -> np.ndarray with dtype `null-terminated binary` (S). I don't think we
# should ever do this, but we do need it for input. That's why we can't test this right now, because we
# can't do it full circle.
return True
return
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning None here avoids sending an unintended value back to the caller, in line with pytest 8.4.0 expectations. Ensure this behavior is intentional for the edge case when dtype.char equals 'S'.

Copilot uses AI. Check for mistakes.

(idx2, xs2) = m.test_array_recode(ctype, dtype, (idx1, xs1))
assert_indexed_arrays_equal((idx1, xs1), (idx2, xs2))


@conftest.override_sparsify("partial")
def test_array_recode_sparsify_partial(array_with_index_and_table):
return _test_array_recode(array_with_index_and_table)
_test_array_recode(array_with_index_and_table)
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the return value here is appropriate since _test_array_recode already asserts internally. This change prevents unnecessary return propagation that could lead to test failures.

Copilot uses AI. Check for mistakes.


@conftest.override_sparsify("none")
def test_array_recode_sparsify_none(array_with_index_and_table):
return _test_array_recode(array_with_index_and_table)
_test_array_recode(array_with_index_and_table)
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, updating this test function to not return the value from _test_array_recode ensures consistency with pytest 8.4.0 requirements. The assertion within _test_array_recode is sufficient to validate the test outcome.

Copilot uses AI. Check for mistakes.