Skip to content

Commit 8237894

Browse files
authored
Merge branch 'main' into feat-config-file
2 parents 42c5ec1 + 2637cd0 commit 8237894

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_parser.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ def test_execution_contextual_override(parser):
7070
assert set(concepts) == expected_concepts
7171

7272

73+
def test_execution_contextual_override(parser):
74+
"""
75+
Tests the contextual override for `_concepts_found.add`.
76+
This should be mapped to 'wisdom', not 'community'.
77+
"""
78+
code = "self._concepts_found.add('new_concept')"
79+
expected_concepts = {"wisdom"}
80+
81+
import ast
82+
83+
body = ast.parse(code).body
84+
concepts = parser.get_execution_concepts(body)
85+
86+
assert set(concepts) == expected_concepts
87+
88+
7389
def test_execution_method_call(parser):
7490
"""Tests that a method call (e.g., db.query) is mapped correctly."""
7591
code = "db.query('SELECT * FROM users')"

0 commit comments

Comments
 (0)