Skip to content

Commit 0189c2a

Browse files
committed
Fixed VistualRegressionTests install
1 parent 5934c4c commit 0189c2a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/ControlExamplePlots.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
module ControlExamplePlots
22

3-
Pkg.status("VisualRegressionTests") == nothing &&
4-
error("VisualRegressionTests needs to be installed, get it at https://github.com/tbreloff/VisualRegressionTests.jl")
5-
6-
using ControlSystems, Plots, VisualRegressionTests
3+
try
4+
Pkg.installed("VisualRegressionTests")
5+
catch
6+
warning("VisualRegressionTests needs to be installed to test plots, adding now:")
7+
Pkg.clone("https://github.com/tbreloff/VisualRegressionTests.jl.git")
8+
end
9+
10+
using ControlSystems, Plots
711

812
include("genplots.jl")
913

src/genplots.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function genplots(funcs, refs; eps=1e-3, kwargs...)
1919
testf(fn) = png(funcs[i](), fn)
2020
results[i] = test_images(VisualTest(testf, ref); eps=eps, kwargs...)
2121
end
22+
results
2223
end
2324

2425
@doc """funcs, refs = getexamples()

0 commit comments

Comments
 (0)