We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 42c5ec1 + 2637cd0 commit 8237894Copy full SHA for 8237894
tests/test_parser.py
@@ -70,6 +70,22 @@ def test_execution_contextual_override(parser):
70
assert set(concepts) == expected_concepts
71
72
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
89
def test_execution_method_call(parser):
90
"""Tests that a method call (e.g., db.query) is mapped correctly."""
91
code = "db.query('SELECT * FROM users')"
0 commit comments