Skip to content

Commit 5280bd9

Browse files
committed
debug: use get for runtests.jl
1 parent f544093 commit 5280bd9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/general.jl

+6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@ end
2929
function info2debugstr(info)
3030
mystr = "Content of getinfo dictionary:\n"
3131
for (key, value) in info
32+
(key == :sol) && continue
3233
mystr *= " :$key => $value\n"
3334
end
35+
if haskey(info, :sol)
36+
split_sol = split(string(info[:sol]), "\n")
37+
solstr = join((lpad(line, length(line) + 2) for line in split_sol), "\n", "")
38+
mystr *= " :sol => \n"*solstr
39+
end
3440
return mystr
3541
end
3642

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include("test_state_estim.jl")
1515
include("test_predictive_control.jl")
1616
include("test_plot_sim.jl")
1717

18-
old_debug_level = ENV["JULIA_DEBUG"]
18+
old_debug_level = get(ENV, "JULIA_DEBUG", "")
1919
DocMeta.setdocmeta!(
2020
ModelPredictiveControl,
2121
:DocTestSetup,

0 commit comments

Comments
 (0)