Skip to content

Commit 5d889bb

Browse files
committed
Fix unitful latexify tests
1 parent 74e5bbb commit 5d889bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PlotsBase/test/test_unitful.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,13 @@ end
295295
296296
@testset "latexify as unitformat" begin
297297
y = rand(10) * u"m^-1"
298+
Latexify.set_default(labelformat = :slash)
298299
@test yguide(plot(y, ylabel = "hello", unitformat = latexify)) == "\$hello\\;\\left/\\;\\mathrm{m}^{-1}\\right.\$"
299300
300301
uf = (l, u) -> l * " (" * latexify(u) * ")"
301302
@test yguide(plot(y, ylabel = "hello", unitformat = uf)) == "hello (\$\\mathrm{m}^{-1}\$)"
302303
Latexify.set_default(labelformat = :square)
303-
@test yguide(plot(y, ylabel = "hello", unitformat = latexify)) == "\$hello\\;\\left[\\;\\mathrm{m}^{-1}\\right]\$"
304+
@test yguide(plot(y, ylabel = "hello", unitformat = latexify)) == "\$hello\\;\\left[\\mathrm{m}^{-1}\\right]\$"
304305
end
305306
306307
@testset "colorbar title" begin

0 commit comments

Comments
 (0)