Skip to content

Commit 64daf52

Browse files
committed
Disable doctests on prerelease
1 parent 123041a commit 64daf52

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

test/runtests.jl

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,22 @@ end
9797
@test_throws ErrorException prob"..."
9898
@test_throws ErrorException logprob"..."
9999
end
100-
@testset "doctests" begin
101-
DocMeta.setdocmeta!(
102-
DynamicPPL,
103-
:DocTestSetup,
104-
:(using DynamicPPL, Distributions);
105-
recursive=true,
106-
)
107-
doctestfilters = [
108-
# Ignore the source of a warning in the doctest output, since this is dependent on host.
109-
# This is a line that starts with "└ @ " and ends with the line number.
110-
r"└ @ .+:[0-9]+",
111-
]
112-
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
100+
if !IS_PRERELEASE
101+
# Don't run doctests on prerelease as error messages etc. may vary
102+
@testset "doctests" begin
103+
DocMeta.setdocmeta!(
104+
DynamicPPL,
105+
:DocTestSetup,
106+
:(using DynamicPPL, Distributions);
107+
recursive=true,
108+
)
109+
doctestfilters = [
110+
# Ignore the source of a warning in the doctest output, since this is dependent on host.
111+
# This is a line that starts with "└ @ " and ends with the line number.
112+
r"└ @ .+:[0-9]+",
113+
]
114+
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
115+
end
113116
end
114117
end
115118
end

0 commit comments

Comments
 (0)