pyplot test fixes; pyplot ref imgs; travis fix
@ -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)'
|
||||
|
||||
@ -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")
|
||||
|
||||
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 44 KiB |
BIN
test/refimg/v0.4/pyplot/ref10.png
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
test/refimg/v0.4/pyplot/ref11.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
test/refimg/v0.4/pyplot/ref12.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
test/refimg/v0.4/pyplot/ref13.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
test/refimg/v0.4/pyplot/ref14.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
test/refimg/v0.4/pyplot/ref15.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
test/refimg/v0.4/pyplot/ref16.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
test/refimg/v0.4/pyplot/ref17.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
test/refimg/v0.4/pyplot/ref18.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
test/refimg/v0.4/pyplot/ref2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/refimg/v0.4/pyplot/ref20.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
test/refimg/v0.4/pyplot/ref3.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
test/refimg/v0.4/pyplot/ref4.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
test/refimg/v0.4/pyplot/ref5.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
test/refimg/v0.4/pyplot/ref6.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
test/refimg/v0.4/pyplot/ref7.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
test/refimg/v0.4/pyplot/ref8.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
test/refimg/v0.4/pyplot/ref9.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
@ -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
|
||||
|
||||