pyplot test fixes; pyplot ref imgs; travis fix

This commit is contained in:
Thomas Breloff 2015-10-26 10:52:29 -04:00
parent 8a0fc00435
commit 141b5c604d
22 changed files with 36 additions and 10 deletions

View File

@ -12,7 +12,7 @@ notifications:
# uncomment the following lines to override the default test script
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone("Images"); Pkg.checkout("50872b3045600d6811b1ffba343bf75467d681c5"); Pkg.clone("ImageMagick"); Pkg.build("ImageMagick")'
- julia -e 'Pkg.clone("Images"); Pkg.checkout("Images","50872b3045600d6811b1ffba343bf75467d681c5"); Pkg.clone("ImageMagick"); Pkg.build("ImageMagick")'
- julia -e 'Pkg.clone("Cairo"); Pkg.build("Cairo")'
- julia -e 'Pkg.clone(pwd()); Pkg.build("Plots")'
- julia -e 'Pkg.test("Plots"; coverage=true)'

View File

@ -2,6 +2,11 @@
# include this first to help with crashing??
using Gtk
# don't let pyplot use a gui... it'll crash
# note: Agg will set gui -> :none in PyPlot
ENV["MPLBACKEND"] = "Agg"
import PyPlot
# macro test_approx_eq_sigma_eps(A, B, sigma, eps)
include("../docs/example_generation.jl")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,5 +1,16 @@
module PlotsTests
# don't let pyplot use a gui... it'll crash
# note: Agg will set gui -> :none in PyPlot
try
ENV["MPLBACKEND"] = "Agg"
import PyPlot
catch err
warn("Couldn't import PyPlot: ", err)
end
using Plots
using FactCheck
@ -11,18 +22,19 @@ include("imgcomp.jl")
# don't actually show the plots
srand(1234)
default(show=false)
# note: we wrap in a try block so that the tests only run if we have the backend installed
# try
Pkg.installed("Gadfly")
gadfly()
backend()
facts("Gadfly") do
@fact backend(:gadfly) --> Plots.GadflyPackage()
default(show=false)
@fact backend() --> Plots.GadflyPackage()
@fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyPackage}
# Pkg.installed("Gadfly")
# gadfly()
# backend()
facts("Gadfly") do
@fact gadfly() --> Plots.GadflyPackage()
@fact backend() --> Plots.GadflyPackage()
@fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyPackage}
# plot(x::AVec, y::AVec; kw...) # one line (will assert length(x) == length(y))
@fact plot(Int[1,2,3], rand(3)) --> not(nothing)
@ -37,7 +49,16 @@ srand(1234)
image_comparison_tests(:gadfly, skip=[4,19], eps=1e-2)
end
end
facts("PyPlot") do
@fact pyplot() --> Plots.PyPlotPackage()
@fact backend() --> Plots.PyPlotPackage()
image_comparison_tests(:pyplot)
end
# catch err
# warn("Skipped Gadfly due to: ", string(err))
# end