Skip to content

Conversation

Copy link

Copilot AI commented Jan 14, 2026

Core vector classes (Vector, HalfVector, SparseVector, Bit) had untested database conversion methods (_to_db, _from_db, _to_db_binary, _from_db_binary) and serialization methods (to_text).

Changes

  • Vector: Added 15 tests covering text serialization, database conversion with dimension validation, binary serialization, and null/ndarray handling
  • HalfVector: Added 15 tests mirroring Vector coverage
  • SparseVector: Added 13 tests for database conversion methods with proper type validation
  • Bit: Added 8 tests for database conversion, binary serialization, and type validation

Coverage Impact

  • Before: 58 tests
  • After: 109 tests (+88%)

All new tests validate edge cases including null handling, dimension mismatches, type validation, and numpy array passthrough behavior.

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve tests coverage in the repo</issue_title>
<issue_description></issue_description>

<agent_instructions>Follow the task, add only necessary tests not redundant ones</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… classes

Co-authored-by: jackrua <155536850+jackrua@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve tests coverage in the repo Add test coverage for database conversion and serialization methods Jan 14, 2026
Copilot AI requested a review from jackrua January 14, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve tests coverage in the repo

2 participants