improve tests
This commit is contained in:
parent
ebf6e6bafe
commit
e9f81e23c8
@ -1,7 +1,7 @@
|
|||||||
using REPL
|
using REPL
|
||||||
using Scratch
|
using Scratch
|
||||||
|
|
||||||
const plotly_local_file_path = Ref{String}()
|
const plotly_local_file_path = Ref{Nothing, String}(nothing)
|
||||||
|
|
||||||
|
|
||||||
function _plots_defaults()
|
function _plots_defaults()
|
||||||
|
|||||||
@ -11,9 +11,8 @@ import GeometryTypes, GeometryBasics
|
|||||||
using Dates
|
using Dates
|
||||||
using RecipesBase
|
using RecipesBase
|
||||||
|
|
||||||
# NOTE: you can run this test only once
|
|
||||||
@testset "Plotly standalone" begin
|
@testset "Plotly standalone" begin
|
||||||
@test_throws UndefRefError Plots.plotly_local_file_path[]
|
@test Plots.plotly_local_file_path[] === nothing
|
||||||
temp = Plots.use_local_dependencies[]
|
temp = Plots.use_local_dependencies[]
|
||||||
withenv("PLOTS_HOST_DEPENDENCY_LOCAL" => true) do
|
withenv("PLOTS_HOST_DEPENDENCY_LOCAL" => true) do
|
||||||
Plots.__init__()
|
Plots.__init__()
|
||||||
@ -21,6 +20,7 @@ using RecipesBase
|
|||||||
@test isfile(Plots.plotly_local_file_path[])
|
@test isfile(Plots.plotly_local_file_path[])
|
||||||
@test Plots.use_local_dependencies[] = true
|
@test Plots.use_local_dependencies[] = true
|
||||||
end
|
end
|
||||||
|
Plots.plotly_local_file_path[] = nothing
|
||||||
Plots.use_local_dependencies[] = temp
|
Plots.use_local_dependencies[] = temp
|
||||||
end # testset
|
end # testset
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user