Spaces:
Running
Running
| from app.pipeline.nodes.retrieve import _focused_source_type, _is_capability_query, _normalise_focus_typos | |
| def test_walk_experience_normalises_to_work_experience() -> None: | |
| assert _normalise_focus_typos("Can you tell me about his walk experience then?") == ( | |
| "can you tell me about his work experience then?" | |
| ) | |
| def test_non_focus_text_is_not_overwritten() -> None: | |
| original = "Tell me about widget orchestration internals" | |
| assert _normalise_focus_typos(original) == original.lower() | |
| def test_capability_query_detection_handles_punctuation() -> None: | |
| assert _is_capability_query("What tech stack does he use?") is True | |
| def test_focus_source_type_for_tech_stack_query() -> None: | |
| assert _focused_source_type("What technologies and skills does he work with?") == "cv" | |
| def test_focus_source_type_for_professional_work_experience_query() -> None: | |
| query = "What work experience do you have in a professional setting" | |
| assert _focused_source_type(query) == "cv" | |
| def test_focus_source_type_for_tech_stack_use_query() -> None: | |
| assert _focused_source_type("What tech stack does he use") == "cv" | |