feat(cli): better error when no instance configured #614
GitHub Actions / JUnit Test Report
failed
Dec 18, 2024 in 0s
234 tests run, 224 passed, 9 skipped, 1 failed.
Annotations
Check failure on line 90 in packages/ragbits-core/tests/cli/test_vector_store.py
github-actions / JUnit Test Report
test_vector_store.test_vector_store_cli_no_store
assert 'Could not find default factory or configuration' in "You need to provide the vector store instance be used. You can do this by \neither:\n- providing a path to a YAML configuration file with the --yaml-path option\n- providing a Python path to a function that creates a vector store with the \n--factory-path option\n- setting the default configuration or factory function in your project's \npyproject.toml file\n"
+ where "You need to provide the vector store instance be used. You can do this by \neither:\n- providing a path to a YAML configuration file with the --yaml-path option\n- providing a Python path to a function that creates a vector store with the \n--factory-path option\n- setting the default configuration or factory function in your project's \npyproject.toml file\n" = <Result SystemExit(1)>.stderr
Raw output
def test_vector_store_cli_no_store():
"""
Test the vector-store CLI command with no store.
Args:
cli_runner: A CLI runner fixture.
"""
runner = CliRunner(mix_stderr=False)
result = runner.invoke(vector_stores_app, ["list"])
> assert "Could not find default factory or configuration" in result.stderr
E assert 'Could not find default factory or configuration' in "You need to provide the vector store instance be used. You can do this by \neither:\n- providing a path to a YAML configuration file with the --yaml-path option\n- providing a Python path to a function that creates a vector store with the \n--factory-path option\n- setting the default configuration or factory function in your project's \npyproject.toml file\n"
E + where "You need to provide the vector store instance be used. You can do this by \neither:\n- providing a path to a YAML configuration file with the --yaml-path option\n- providing a Python path to a function that creates a vector store with the \n--factory-path option\n- setting the default configuration or factory function in your project's \npyproject.toml file\n" = <Result SystemExit(1)>.stderr
packages/ragbits-core/tests/cli/test_vector_store.py:90: AssertionError
Loading