Skip to content

Commit

Permalink
fix weakdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Nov 13, 2024
1 parent a779743 commit ef50737
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PlotsBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PlotlyJSExt = "PlotlyJS"
PlotlyKaleidoExt = "PlotlyKaleido"
PythonPlotExt = "PythonPlot"
UnicodePlotsExt = "UnicodePlots"
UnitfulExt = ["Latexify", "LaTeXStrings", "Unitful", "UnitfulLatexify"]
UnitfulExt = ["Latexify", "LaTeXStrings", "UnitfulLatexify", "Unitful"]

[compat]
Base64 = "1"
Expand Down
17 changes: 11 additions & 6 deletions PlotsBase/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ get!(ENV, "MPLBACKEND", "agg")

using PlotsBase

# backends weakdeps
import UnitfulLatexify
import LaTeXStrings
import Latexify
import Contour
import Colors
# multiple weakdeps (keep in sync with Project.toml !)
const WEAKDEPS = Expr(
:block,
:(import Latexify)
:(import UnitfulLatexify),
:(import LaTeXStrings),
:(import Latexify),
:(import Contour),
:(import Colors),
)
eval(WEAKDEPS)

# initialize all backends
for pkg TEST_PACKAGES
Expand Down
3 changes: 3 additions & 0 deletions PlotsBase/test/test_preferences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ end
write(
script,
"""
$WEAKDEPS
import $pkg
using Test, PlotsBase
$be()
res = @testset "[subtest] persistent backend $pkg" begin
@test PlotsBase.backend_name() ≡ :$be
Expand Down

0 comments on commit ef50737

Please sign in to comment.