improve tests

This commit is contained in:
Simon Christ 2020-10-20 17:07:53 +02:00
parent ebf6e6bafe
commit e9f81e23c8
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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