diff --git a/examples/model_coupling/runtests.jl b/examples/model_coupling/runtests.jl index f3d32489..81d09924 100644 --- a/examples/model_coupling/runtests.jl +++ b/examples/model_coupling/runtests.jl @@ -54,7 +54,7 @@ Mads.madsinfo("External coupling using `Command` and JSON ...") md = Mads.loadmadsfile(joinpath(workdir, "external-json-exp.mads")) # sparam, sresults = Mads.calibrate(md) efor = Mads.forward(md) -if !haskey(ENV, "MADS_NO_PYTHON") +if !haskey(ENV, "MADS_NO_PYTHON") && isdefined(Mads, :yaml) Mads.madsinfo("External coupling using `Command` and YAML ...") md = Mads.loadmadsfile(joinpath(workdir, "external-yaml.mads")) # yparam, yresults = Mads.calibrate(md) diff --git a/examples/optimization/runtests.jl b/examples/optimization/runtests.jl index d7126493..81a61e59 100644 --- a/examples/optimization/runtests.jl +++ b/examples/optimization/runtests.jl @@ -12,7 +12,7 @@ if Mads.long_tests md = Mads.loadmadsfile(joinpath(workdir, "external-jld.mads")) jparam, jresults = Mads.calibrate(md, maxEval=2, np_lambda=1, maxJacobians=1) - if !haskey(ENV, "MADS_NO_PYTHON") + if !haskey(ENV, "MADS_NO_PYTHON") && isdefined(Mads, :yaml) md = Mads.loadmadsfile(joinpath(workdir, "external-yaml.mads")) yparam, yresults = Mads.calibrate(md, maxEval=2, np_lambda=1, maxJacobians=1) @Base.Test.test yparam == jparam