Added display checks to Date/DateTime tests to ensure they are able to be displayed

This commit is contained in:
Thatcher Chamberlin 2020-12-06 13:27:30 -05:00
parent de03c3bca8
commit 0bc41f22bb

View File

@ -13,6 +13,7 @@ using Plots, Test, Dates
ref_xlims = (x[1].instant.periods.value, x[end].instant.periods.value) ref_xlims = (x[1].instant.periods.value, x[end].instant.periods.value)
@test Plots.ylims(p) == ref_ylims @test Plots.ylims(p) == ref_ylims
@test Plots.xlims(p) == ref_xlims @test Plots.xlims(p) == ref_xlims
@test isa(display(p), Nothing) == true
end # testset end # testset
@testset "Date xlims" begin @testset "Date xlims" begin
@ -21,6 +22,7 @@ end # testset
span = (Date(2019,10,31), Date(2019,11,11)) span = (Date(2019,10,31), Date(2019,11,11))
p = plot(x,y, xlims=span, widen = false) p = plot(x,y, xlims=span, widen = false)
@test isa(display(p), Nothing) == true
end # testset end # testset
@testset "DateTime xlims" begin @testset "DateTime xlims" begin
@ -29,4 +31,5 @@ end # testset
span = (DateTime(2019,10,31,11,59,59), DateTime(2019,11,11,12,01,15)) span = (DateTime(2019,10,31,11,59,59), DateTime(2019,11,11,12,01,15))
p = plot(x,y, xlims=span, widen = false) p = plot(x,y, xlims=span, widen = false)
@test isa(display(p), Nothing) == true
end # testset end # testset