Spaces:
Runtime error
Runtime error
Download chromadb/test/test_cli.py from expressapi/chroma: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/spaces/expressapi/chroma/resolve/main/chromadb/test/test_cli.py
- Command line
-
hf download hf://spaces/expressapi/chroma/chromadb/test/test_cli.py
-
curl -L -o test_cli.py https://huggingface.co/spaces/expressapi/chroma/resolve/main/chromadb/test/test_cli.py
642 Bytes
| from typer.testing import CliRunner | |
| from chromadb.cli.cli import app | |
| from chromadb.cli.utils import set_log_file_path | |
| runner = CliRunner() | |
| def test_app() -> None: | |
| result = runner.invoke( | |
| app, | |
| [ | |
| "run", | |
| "--path", | |
| "chroma_test_data", | |
| "--port", | |
| "8001", | |
| "--test", | |
| ], | |
| ) | |
| assert "chroma_test_data" in result.stdout | |
| assert "8001" in result.stdout | |
| def test_utils_set_log_file_path() -> None: | |
| log_config = set_log_file_path("chromadb/log_config.yml", "test.log") | |
| assert log_config["handlers"]["file"]["filename"] == "test.log" | |