Skip to content

Commit 014ed32

Browse files
committed
Unitful + Latexify extension won't work on old Julia anyway
1 parent 6eb9360 commit 014ed32

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/test_unitful.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,14 @@ end
294294
@test plot(y, label = P"meters") isa Plots.Plot
295295
end
296296

297-
@testset "latexify as unitformat" begin
298-
y = rand(10) * u"m^-1"
299-
@test yguide(plot(y, ylabel = "hello", unitformat = latexify)) == "\$hello\\;\\left/\\;\\mathrm{m}^{-1}\\right.\$"
297+
if isdefined(Base, :get_extension)
298+
@testset "latexify as unitformat" begin
299+
y = rand(10) * u"m^-1"
300+
@test yguide(plot(y, ylabel = "hello", unitformat = latexify)) == "\$hello\\;\\left/\\;\\mathrm{m}^{-1}\\right.\$"
300301

301-
uf = (l, u) -> l * " (" * latexify(u) * ")"
302-
@test yguide(plot(y, ylabel = "hello", unitformat = uf)) == "hello (\$\\mathrm{m}^{-1}\$)"
302+
uf = (l, u) -> l * " (" * latexify(u) * ")"
303+
@test yguide(plot(y, ylabel = "hello", unitformat = uf)) == "hello (\$\\mathrm{m}^{-1}\$)"
304+
end
303305
end
304306

305307
@testset "colorbar title" begin

0 commit comments

Comments
 (0)