Skip to content

[BUG](test): fix broken default pytest fixtures in conftest.py - #7488

Open
Diwak4r wants to merge 2 commits into
chroma-core:mainfrom
Diwak4r:fix/conftest-fixture-registration
Open

[BUG](test): fix broken default pytest fixtures in conftest.py#7488
Diwak4r wants to merge 2 commits into
chroma-core:mainfrom
Diwak4r:fix/conftest-fixture-registration

Conversation

@Diwak4r

@Diwak4r Diwak4r commented Jul 22, 2026

Copy link
Copy Markdown

Linked Issue

Closes #7395

Description

The default test fixture list in had two issues:

  1. , , and were plain generator functions without decorators, so pytest couldn't resolve them by name when tests requested them.
  2. referenced a non-existent fixture "sqlite_fixture" instead of the actual fixture name "sqlite".

These bugs caused fixture 'fastapi' not found and similar errors when running the default local test path.

Fix

  • Add to , , and
  • Correct "sqlite_fixture" to "sqlite" in

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • Code follows the project's style guidelines
  • Self-review performed

Diwak4r and others added 2 commits July 22, 2026 18:28
Embedded NUL (\x00) bytes corrupt the FTS5 inverted index tokenizer,
causing "fts5: syntax error near" on full-text queries. Strip them
at both insertion points: the metadata table and the FTS5 virtual
table.

Fixes chroma-core#7388
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
The default test fixture list references three functions (fastapi, async_fastapi,
fastapi_persistent) that lack @pytest.fixture() decorators, and references a
non-existent "sqlite_fixture" name that should be "sqlite".

Without these decorators pytest cannot resolve the fixtures when tests request
them by name via filtered_fixture_names(). The sqlite name mismatch similarly
causes fixture resolution failures.

Fix:
- Add @pytest.fixture(scope="function") to fastapi, async_fastapi, and
  fastapi_persistent
- Replace "sqlite_fixture" with "sqlite" in filtered_fixture_names()

Closes chromadb/chroma#7395
Copilot AI review requested due to automatic review settings July 22, 2026 16:49

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[Bug]: Default pytest fixture path is broken in chromadb/test/conftest.py

2 participants