From e9f81e23c8b4db79a49f6e4773742c253d2ae79b Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Tue, 20 Oct 2020 17:07:53 +0200 Subject: [PATCH] improve tests --- src/init.jl | 2 +- test/runtests.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.jl b/src/init.jl index b4c62dbf..d7eea658 100644 --- a/src/init.jl +++ b/src/init.jl @@ -1,7 +1,7 @@ using REPL using Scratch -const plotly_local_file_path = Ref{String}() +const plotly_local_file_path = Ref{Nothing, String}(nothing) function _plots_defaults() diff --git a/test/runtests.jl b/test/runtests.jl index a3fb3be4..6f7eacf3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,9 +11,8 @@ import GeometryTypes, GeometryBasics using Dates using RecipesBase -# NOTE: you can run this test only once @testset "Plotly standalone" begin - @test_throws UndefRefError Plots.plotly_local_file_path[] + @test Plots.plotly_local_file_path[] === nothing temp = Plots.use_local_dependencies[] withenv("PLOTS_HOST_DEPENDENCY_LOCAL" => true) do Plots.__init__() @@ -21,6 +20,7 @@ using RecipesBase @test isfile(Plots.plotly_local_file_path[]) @test Plots.use_local_dependencies[] = true end + Plots.plotly_local_file_path[] = nothing Plots.use_local_dependencies[] = temp end # testset