Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Consiliency_treesitter-chunker /tests /test_nearest_tests.py
| from chunker.helpers.nearest_tests import nearest_tests | |
| def test_nearest_tests_ranks_expected_files(tmp_path): | |
| # Create a few files | |
| (tmp_path / "tests").mkdir() | |
| t1 = tmp_path / "tests" / "test_utils.py" | |
| t1.write_text("def test_x(): pass\n# utils in name", encoding="utf-8") | |
| t2 = tmp_path / "utils_test.js" | |
| t2.write_text("// utils referenced here", encoding="utf-8") | |
| irrel = tmp_path / "tests" / "test_irrelevant.py" | |
| irrel.write_text("def test_y(): pass", encoding="utf-8") | |
| results = nearest_tests(["utils"], str(tmp_path)) | |
| assert results, "expected some candidates" | |
| paths = [r["path"] for r in results] | |
| # Top results should include our utils-named files | |
| assert str(t1) in paths | |
| assert str(t2) in paths | |
Xet Storage Details
- Size:
- 761 Bytes
- Xet hash:
- 7c6a4c308938054e061c6714948249d9ee5336ef886d8192154174d8e51de842
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.