working on tests
This commit is contained in:
parent
141b5c604d
commit
b9f9d8160d
@ -12,7 +12,8 @@ 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("Images","50872b3045600d6811b1ffba343bf75467d681c5"); Pkg.clone("ImageMagick"); Pkg.build("ImageMagick")'
|
||||
- julia -e 'Pkg.clone("https://github.com/tbreloff/Images.jl.git"); Pkg.checkout("Images","tom_imgcompare");'
|
||||
- jukai -e '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)'
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
# convert colorant to 4-tuple RGBA
|
||||
getPyPlotColor(c::Colorant) = map(f->float(f(c)), (red, green, blue, alpha))
|
||||
getPyPlotColor(scheme::ColorScheme) = getPyPlotColor(getColor(scheme))
|
||||
getPyPlotColor(c) = getPyPlotColor(convertColor(c))
|
||||
|
||||
# getPyPlotColorMap(c::ColorGradient) = PyPlot.matplotlib[:colors][:ListedColormap](map(getPyPlotColor, getColorVector(c)))
|
||||
function getPyPlotColorMap(c::ColorGradient)
|
||||
|
||||
@ -6,3 +6,4 @@ FactCheck
|
||||
Gadfly
|
||||
Images
|
||||
ImageMagick
|
||||
PyPlot
|
||||
|
||||
@ -3,11 +3,11 @@ module PlotsTests
|
||||
|
||||
# don't let pyplot use a gui... it'll crash
|
||||
# note: Agg will set gui -> :none in PyPlot
|
||||
ENV["MPLBACKEND"] = "Agg"
|
||||
try
|
||||
ENV["MPLBACKEND"] = "Agg"
|
||||
import PyPlot
|
||||
@eval import PyPlot
|
||||
catch err
|
||||
warn("Couldn't import PyPlot: ", err)
|
||||
warn("Couldn't import PyPlot: $err")
|
||||
end
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@ default(show=false)
|
||||
# gadfly()
|
||||
# backend()
|
||||
|
||||
img_eps = 1e-2
|
||||
|
||||
facts("Gadfly") do
|
||||
@fact gadfly() --> Plots.GadflyPackage()
|
||||
@fact backend() --> Plots.GadflyPackage()
|
||||
@ -47,14 +49,14 @@ facts("Gadfly") do
|
||||
# plot(x::AMat, y::AMat; kw...) # multiple lines (one per column of x/y... will assert size(x) == size(y))
|
||||
@fact plot!(rand(10,3), rand(10,3)) --> not(nothing)
|
||||
|
||||
image_comparison_tests(:gadfly, skip=[4,19], eps=1e-2)
|
||||
image_comparison_tests(:gadfly, skip=[4,19], eps=img_eps)
|
||||
|
||||
end
|
||||
|
||||
facts("PyPlot") do
|
||||
@fact pyplot() --> Plots.PyPlotPackage()
|
||||
@fact backend() --> Plots.PyPlotPackage()
|
||||
image_comparison_tests(:pyplot)
|
||||
image_comparison_tests(:pyplot, skip=[19], eps=img_eps)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user