Skip to content

Commit

Permalink
Try a more aggressive diversion in trace test
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Dec 16, 2024
1 parent ed9134a commit 581db62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/builtin/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def counting_print_evaluate(
evaluate("f[x_] := x + f[x-1]; f[0] = 0")
global trace_evaluation_calls
trace_evaluation_calls = 0
mathics.eval.tracing.print_evaluate = counting_print_evaluate
mathics.eval.tracing.print_evaluate = (
mathics.eval.tracing.trace_evaluate_on_call
) = mathics.eval.tracing.trace_evaluate_on_return = counting_print_evaluate
evaluate("f[30] // TraceEvaluation")

except AbortInterrupt:
Expand Down

0 comments on commit 581db62

Please sign in to comment.