Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed Sep 5, 2022
1 parent 342dd50 commit 9395c09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Test
@test_nowarn @eval using Kaleido
@test_nowarn @eval using PlotlyKaleido

import PlotlyLight, EasyConfig, PlotlyJS

@testset "Saving JSON String" begin
plt = "{\"data\":{\"data\":[{\"y\":[1,2,3],\"type\":\"scatter\",\"x\":[0,1,2]}]}}"
for ext in Kaleido.ALL_FORMATS
for ext in PlotlyKaleido.ALL_FORMATS
file = tempname() * ".$ext"
open(io -> Kaleido.save_payload(io, plt, ext), file, "w")
open(io -> PlotlyKaleido.save_payload(io, plt, ext), file, "w")
@test isfile(file)
rm(file)
end
Expand All @@ -18,10 +18,10 @@ end
PlotlyJS.plot(PlotlyJS.scatter(x=rand(10))),
PlotlyLight.Plot(EasyConfig.Config(x=rand(10)))
]
for ext in Kaleido.ALL_FORMATS
for ext in PlotlyKaleido.ALL_FORMATS
ext == "eps" && continue # TODO" Why does this work above but not here?
file = tempname() * ".$ext"
@test Kaleido.savefig(plt, file) == file
@test PlotlyKaleido.savefig(plt, file) == file
@test isfile(file)
rm(file)
end
Expand Down

0 comments on commit 9395c09

Please sign in to comment.