Upload folder using huggingface_hub
Browse files- src/test.py +4 -2
src/test.py
CHANGED
|
@@ -140,11 +140,12 @@ async def test_github_commits_contains_shas(ai_me_agent):
|
|
| 140 |
assert len(response) > 10, "Response is too short"
|
| 141 |
logger.info(f"✓ Test passed - response contains commit information")
|
| 142 |
logger.info(f"Response length: {len(response)}")
|
|
|
|
| 143 |
@pytest.mark.asyncio
|
| 144 |
async def test_unknown_person_contains_negative_response(ai_me_agent):
|
| 145 |
"""Tests REQ-003: Graceful handling of out-of-scope requests."""
|
| 146 |
response = await ai_me_agent.run(
|
| 147 |
-
"
|
| 148 |
)
|
| 149 |
|
| 150 |
assert response, "Response is empty"
|
|
@@ -155,6 +156,8 @@ async def test_unknown_person_contains_negative_response(ai_me_agent):
|
|
| 155 |
or "don't have any information" in response.lower()
|
| 156 |
), f"Response doesn't indicate lack of knowledge: {response}"
|
| 157 |
logger.info(f"✓ Test passed - correctly handled out-of-scope query")
|
|
|
|
|
|
|
| 158 |
@pytest.mark.asyncio
|
| 159 |
async def test_carol_knowledge_contains_product(ai_me_agent):
|
| 160 |
"""Tests FR-002, FR-003: Verify that asking about Carol returns information containing 'product'."""
|
|
@@ -282,7 +285,6 @@ async def test_user_story_2_multi_topic_consistency(ai_me_agent):
|
|
| 282 |
# Ask 3 questions about different topics
|
| 283 |
topics = [
|
| 284 |
("What is your background in technology?", "background|experience|technology"),
|
| 285 |
-
("Tell me about your current work at Neosofia", "Neosofia|current|employer"),
|
| 286 |
("What programming languages are you skilled in?", "programming|language|skilled"),
|
| 287 |
]
|
| 288 |
|
|
|
|
| 140 |
assert len(response) > 10, "Response is too short"
|
| 141 |
logger.info(f"✓ Test passed - response contains commit information")
|
| 142 |
logger.info(f"Response length: {len(response)}")
|
| 143 |
+
|
| 144 |
@pytest.mark.asyncio
|
| 145 |
async def test_unknown_person_contains_negative_response(ai_me_agent):
|
| 146 |
"""Tests REQ-003: Graceful handling of out-of-scope requests."""
|
| 147 |
response = await ai_me_agent.run(
|
| 148 |
+
"Do you know Slartibartfast?" # Presumed unknown person
|
| 149 |
)
|
| 150 |
|
| 151 |
assert response, "Response is empty"
|
|
|
|
| 156 |
or "don't have any information" in response.lower()
|
| 157 |
), f"Response doesn't indicate lack of knowledge: {response}"
|
| 158 |
logger.info(f"✓ Test passed - correctly handled out-of-scope query")
|
| 159 |
+
|
| 160 |
+
|
| 161 |
@pytest.mark.asyncio
|
| 162 |
async def test_carol_knowledge_contains_product(ai_me_agent):
|
| 163 |
"""Tests FR-002, FR-003: Verify that asking about Carol returns information containing 'product'."""
|
|
|
|
| 285 |
# Ask 3 questions about different topics
|
| 286 |
topics = [
|
| 287 |
("What is your background in technology?", "background|experience|technology"),
|
|
|
|
| 288 |
("What programming languages are you skilled in?", "programming|language|skilled"),
|
| 289 |
]
|
| 290 |
|