Skip to content

Commit 36bed3d

Browse files
authored
fixed bug in which local functions were not included in the output upon failure
1 parent cc54d6c commit 36bed3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

check50/assertions/runtime.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ def is_builtin_name(name):
101101
eval_globals = caller_globals.copy()
102102
eval_globals.update(eval_context)
103103

104-
cond = eval(eval_src, eval_globals, eval_context)
104+
# Merge locals with expression context for evaluation
105+
eval_locals = caller_locals.copy()
106+
eval_locals.update(eval_context)
107+
108+
cond = eval(eval_src, eval_globals, eval_locals)
105109

106110
# Finally, quit if the condition evaluated to True.
107111
if cond:

0 commit comments

Comments
 (0)