Skip to content

Commit 47d23e5

Browse files
committed
fix: Update tests to reflect vocabulary improvements
Fixed 2 failing pytest tests after vocabulary tuning: 1. test_intent_from_function_name: - "status" now maps to "wisdom" (not a separate concept) - Updated expected concepts from {"wisdom", "power", "status"} to {"wisdom", "power"} 2. test_execution_error_handling: - "log" now recognized as "wisdom" from vocabulary - Updated expected concepts from {"justice", "love", "power"} to {"justice", "love", "power", "wisdom"} All 59 pytest tests now pass ✅ All 4 standalone tests pass ✅ These changes reflect the vocabulary tuning done to reduce false positives, where boolean predicates and state-checking operations were moved from Justice to Wisdom dimension.
1 parent ebee93c commit 47d23e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_parser.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def test_intent_from_function_name(parser):
2323
Tests that concepts are correctly extracted from a function name.
2424
"""
2525
name = "get_user_by_id_and_update_status"
26-
# 'get' -> wisdom, 'update' -> power
27-
expected_concepts = {"wisdom", "power", "status"}
26+
# 'get' -> wisdom, 'update' -> power, 'status' -> wisdom
27+
expected_concepts = {"wisdom", "power"}
2828
concepts = parser.get_intent_concepts(name, None)
2929
assert set(concepts) == expected_concepts
3030

@@ -102,7 +102,8 @@ def test_execution_error_handling(parser):
102102
log_error("Division by zero")
103103
raise ValueError("Invalid operation")
104104
"""
105-
expected_concepts = {"justice", "love", "power"}
105+
# try -> justice, except -> love, log -> wisdom, raise -> power
106+
expected_concepts = {"justice", "love", "power", "wisdom"}
106107
body = ast.parse(code).body
107108
_, concepts = parser.get_execution_map(body)
108109
assert set(concepts) == expected_concepts

0 commit comments

Comments
 (0)