Skip to content

Commit fdbce19

Browse files
test: avoid spamming stderr in debugging tests
1 parent 735f1ea commit fdbce19

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/debugging.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ end
2525
dsys = debug_system(sys; functions = [])
2626
@test is_parameter(dsys, ASSERTION_LOG_VARIABLE)
2727
prob = Problem(dsys, [x => 0.1], (0.0, 5.0))
28-
sol = solve(prob, alg)
29-
@test !SciMLBase.successful_retcode(sol)
30-
prob.ps[ASSERTION_LOG_VARIABLE] = true
3128
sol = @test_logs (:error, r"ohno") match_mode=:any solve(prob, alg)
3229
@test !SciMLBase.successful_retcode(sol)
30+
prob.ps[ASSERTION_LOG_VARIABLE] = false
31+
sol = @test_nowarn solve(prob, alg)
32+
@test !SciMLBase.successful_retcode(sol)
3333
end
3434
end
3535

@@ -41,10 +41,10 @@ end
4141
dsys = debug_system(outer; functions = [])
4242
@test is_parameter(dsys, ASSERTION_LOG_VARIABLE)
4343
prob = Problem(dsys, [inner.x => 0.1], (0.0, 5.0))
44-
sol = solve(prob, alg)
45-
@test !SciMLBase.successful_retcode(sol)
46-
prob.ps[ASSERTION_LOG_VARIABLE] = true
4744
sol = @test_logs (:error, r"ohno") match_mode=:any solve(prob, alg)
4845
@test !SciMLBase.successful_retcode(sol)
46+
prob.ps[ASSERTION_LOG_VARIABLE] = false
47+
sol = @test_nowarn solve(prob, alg)
48+
@test !SciMLBase.successful_retcode(sol)
4949
end
5050
end

0 commit comments

Comments
 (0)