Skip to content

Commit a444e15

Browse files
committed
better test coverage
1 parent 2ca2fe8 commit a444e15

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/PlotlyLight.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ function Base.show(io::IO, M::MIME"text/html", o::Plot; setting::Settings = DEFA
263263
end
264264

265265
#-----------------------------------------------------------------------------# collectrows
266-
collectrows(x::AbstractMatrix) = collect.(eachrow(x))
266+
function collectrows(x::AbstractMatrix)
267+
Base.depwarn("collectrows is deprecated. PlotlyLight now automatically applies this to matrices", :collectrows; force=true)
268+
collect.(eachrow(x))
269+
end
267270

268271
fix_matrix(x::Config) = Config(k => fix_matrix(v) for (k,v) in pairs(x))
269272
fix_matrix(x) = x

test/runtests.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,13 @@ end
7777

7878
settings!(fix_matrix = false)
7979
@test occursin("[1,2,3,4]", html(p))
80+
81+
@test occursin("Settings", repr(settings!()))
82+
end
83+
84+
#-----------------------------------------------------------------------------# other
85+
@testset "other" begin
86+
@test occursin("{}", repr("text/html", PlotlyLight.page(Plot())))
87+
88+
@test_warn "deprecated" PlotlyLight.collectrows(rand(2,2))
8089
end

0 commit comments

Comments
 (0)