Skip to content

Commit 57bd111

Browse files
committed
Disable doctests on prerelease
1 parent 32f9054 commit 57bd111

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
@@ -98,19 +98,22 @@ end
9898
@test_throws ErrorException prob"..."
9999
@test_throws ErrorException logprob"..."
100100
end
101-
@testset "doctests" begin
102-
DocMeta.setdocmeta!(
103-
DynamicPPL,
104-
:DocTestSetup,
105-
:(using DynamicPPL, Distributions);
106-
recursive=true,
107-
)
108-
doctestfilters = [
109-
# Ignore the source of a warning in the doctest output, since this is dependent on host.
110-
# This is a line that starts with "└ @ " and ends with the line number.
111-
r"└ @ .+:[0-9]+",
112-
]
113-
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
101+
if !IS_PRERELEASE
102+
# Don't run doctests on prerelease as error messages etc. may vary
103+
@testset "doctests" begin
104+
DocMeta.setdocmeta!(
105+
DynamicPPL,
106+
:DocTestSetup,
107+
:(using DynamicPPL, Distributions);
108+
recursive=true,
109+
)
110+
doctestfilters = [
111+
# Ignore the source of a warning in the doctest output, since this is dependent on host.
112+
# This is a line that starts with "└ @ " and ends with the line number.
113+
r"└ @ .+:[0-9]+",
114+
]
115+
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
116+
end
114117
end
115118
end
116119
end

0 commit comments

Comments
 (0)