Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /AmberLee2427_nancy-brain /tests /test_cli_missing_embeddings.py
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| import pytest | |
| def test_search_missing_embeddings_message(tmp_path, capsys): | |
| """Running the CLI search when embeddings are missing prints a helpful tip.""" | |
| # Run the CLI search command pointing at a temp embeddings path with no index | |
| env = dict(**{}) | |
| cmd = [ | |
| sys.executable, | |
| "-m", | |
| "nancy_brain.cli", | |
| "search", | |
| "dummy-query", | |
| "--embeddings-path", | |
| str(tmp_path / "emb"), | |
| ] # noqa: E501 | |
| result = subprocess.run(cmd, capture_output=True, env=env) | |
| out = result.stdout.decode("utf-8") + result.stderr.decode("utf-8") | |
| assert "Embeddings index missing" in out | |
| assert "nancy-brain build" in out | |
Xet Storage Details
- Size:
- 735 Bytes
- Xet hash:
- a6a0d7efeb919adf52c35bf5d5b69b305afbe12236c216d837d4c5ce12ecafa9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.