Skip to content

fix: resolve ChromaDB test mock setup and normalize_distance tests#34

Merged
himanshu231204 merged 1 commit into
mainfrom
fix/chroma-test-mock-setup
Jul 11, 2026
Merged

fix: resolve ChromaDB test mock setup and normalize_distance tests#34
himanshu231204 merged 1 commit into
mainfrom
fix/chroma-test-mock-setup

Conversation

@himanshu231204

Copy link
Copy Markdown
Contributor
  • Add mock_collection.count.return_value to mock_chromadb fixture to prevent TypeError when comparing MagicMock to int
  • Fix TestChromaNormaliseDistance to use normalize_distance() from _scoring module instead of non-existent _normalise_distance method
  • All 815 unit tests now pass

Description

A clear and concise description of what this PR does.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Test update
  • CI/CD update

Related Issues

Closes #(issue_number)

How Has This Been Tested?

Describe the tests that you ran to verify your changes.

  • Unit tests pass (uv run pytest)
  • Linter passes (uv run ruff check .)
  • Type checker passes (uv run mypy openagent_eval/)
  • Manual testing performed

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Add screenshots to demonstrate visual changes.

Additional Notes

Add any other notes about the PR here.

- Add mock_collection.count.return_value to mock_chromadb fixture
  to prevent TypeError when comparing MagicMock to int
- Fix TestChromaNormaliseDistance to use normalize_distance() from
  _scoring module instead of non-existent _normalise_distance method
- All 815 unit tests now pass
@himanshu231204 himanshu231204 merged commit c523e87 into main Jul 11, 2026
10 checks passed
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.

1 participant