Skip to content

Update tests for CLI commands#19

Merged
jbencina merged 6 commits intomainfrom
jbencina/cli-tests
May 20, 2025
Merged

Update tests for CLI commands#19
jbencina merged 6 commits intomainfrom
jbencina/cli-tests

Conversation

@jbencina
Copy link
Copy Markdown
Owner

Summary

Closes issue #18 by adding test coverage for most CLI commands. Prompt response and Gradio UI currently remain uncovered.

Test Plan

Pass tests

@jbencina jbencina requested a review from Copilot May 20, 2025 06:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances test coverage for vecsync's CLI commands by adding new tests for CLI operations and consolidating testing fixtures.

  • Removed tests from tests/openai/conftest.py and integrated their functionality into tests/conftest.py
  • Added new test files for CLI commands: sync, store, settings, and assistants
  • Updated the CHANGELOG to reflect new tests and fixture reorganization

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/openai/conftest.py Removed; its functionality appears consolidated into tests/conftest.py
tests/conftest.py Added and updated shared mock classes and fixtures for testing
tests/cli/test_cli_sync.py Added tests for syncing file source via CLI
tests/cli/test_cli_store.py Added tests for listing and deleting files from vector store
tests/cli/test_cli_settings.py Added tests for showing and clearing settings
tests/cli/test_cli_assistants.py Added tests for listing and cleaning assistants
src/vecsync/cli/settings.py Minor update to add a confirmation message when settings are cleared
src/vecsync/cli/entry.py Added a pragma line to exclude file from coverage
src/vecsync/cli.py Removed, likely due to CLI refactoring
CHANGELOG.md Updated to include new tests and fixture reorganization
Comments suppressed due to low confidence (2)

tests/openai/conftest.py:1

  • Ensure that the removal of this file is intentional and that all tests previously relying on its fixtures now correctly reference those in tests/conftest.py.
Entire file removal.

src/vecsync/cli/settings.py:12

  • The function 'colored' is used without being imported, which will cause a NameError at runtime. Please import 'colored' from the 'termcolor' module or replace its usage with an already imported function (e.g., cprint).
click.echo(colored("Settings file cleared.", "green"))

@jbencina jbencina marked this pull request as ready for review May 20, 2025 06:10
@jbencina jbencina merged commit 1d43002 into main May 20, 2025
16 checks passed
@jbencina jbencina deleted the jbencina/cli-tests branch May 20, 2025 06:10
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.

2 participants