Skip to content

Commit 11927b4

Browse files
committed
Remove stdout/stderr suppression from grade testset
- Removed redirect_stdout/stderr to devnull as the testset itself suppresses Test output - This preserves useful debugging output from println and @info statements - Used try/finally to ensure testset is properly popped even on errors - The Test module won't print results when running inside a testset, which is sufficient
1 parent 82bed5f commit 11927b4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/tools/grade_problem.jl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,16 @@ function ClaudeMCPTools.execute(tool::GradeProblemTool, params::Dict)
4646
# Variable to store the grading result
4747
result = nothing
4848

49-
# Capture output using devnull to suppress test output
49+
# Push testset to capture test results (Test module won't print when inside a testset)
5050
Test.push_testset(ts)
51-
redirect_stdout(devnull) do
52-
redirect_stderr(devnull) do
53-
# Call the grade function with all arguments
54-
# Use invokelatest to handle world age issues when loading modules dynamically
55-
# Always pass all three parameters - the function has a default value for problem_id
56-
result = Base.invokelatest(tool.grade_fn, tool.working_dir, transcript, problem_id)
57-
end
51+
try
52+
# Call the grade function with all arguments
53+
# Use invokelatest to handle world age issues when loading modules dynamically
54+
# Always pass all three parameters - the function has a default value for problem_id
55+
result = Base.invokelatest(tool.grade_fn, tool.working_dir, transcript, problem_id)
56+
finally
57+
Test.pop_testset()
5858
end
59-
Test.pop_testset()
6059

6160
# Format testset results
6261
test_summary = Dict{String,Any}(

0 commit comments

Comments
 (0)