From 0a929d60221abd38168a2d8ac460fd305ef2ff7c Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 1 Jul 2020 09:44:27 +0200 Subject: [PATCH] try to fix tests on windows julia 1.3 --- test/runtests.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index dcf305ad..adc4eaf8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -44,28 +44,28 @@ include("imgcomp.jl") # don't actually show the plots Random.seed!(1234) default(show=false, reuse=true) -is_ci() = get(ENV, "CI", "false") == "true" -img_tol = is_ci() ? 1e-2 : Sys.islinux() ? 1e-3 : 0.1 +const IS_CI = get(ENV, "CI", "false") == "true" +const IMG_TOL = VERSION < v"1.4" && Sys.iswindows() ? 1e-1 : IS_CI ? 1e-2 : 1e-3 ## Uncomment the following lines to update reference images for different backends # @testset "GR" begin -# image_comparison_facts(:gr, tol=img_tol, skip = Plots._backend_skips[:gr]) +# image_comparison_facts(:gr, tol=IMG_TOL, skip = Plots._backend_skips[:gr]) # end # # plotly() # @testset "Plotly" begin -# image_comparison_facts(:plotly, tol=img_tol, skip = Plots._backend_skips[:plotlyjs]) +# image_comparison_facts(:plotly, tol=IMG_TOL, skip = Plots._backend_skips[:plotlyjs]) # end # # pyplot() # @testset "PyPlot" begin -# image_comparison_facts(:pyplot, tol=img_tol, skip = Plots._backend_skips[:pyplot]) +# image_comparison_facts(:pyplot, tol=IMG_TOL, skip = Plots._backend_skips[:pyplot]) # end # # pgfplotsx() # @testset "PGFPlotsX" begin -# image_comparison_facts(:pgfplotsx, tol=img_tol, skip = Plots._backend_skips[:pgfplotsx]) +# image_comparison_facts(:pgfplotsx, tol=IMG_TOL, skip = Plots._backend_skips[:pgfplotsx]) # end # 10 Histogram2D @@ -83,7 +83,7 @@ img_tol = is_ci() ? 1e-2 : Sys.islinux() ? 1e-3 : 0.1 @static if haskey(ENV, "APPVEYOR") @info "Skipping GR image comparison tests on AppVeyor" else - image_comparison_facts(:gr, tol=img_tol, skip = Plots._backend_skips[:gr]) + image_comparison_facts(:gr, tol=IMG_TOL, skip = Plots._backend_skips[:gr]) end end