Skip to content

Commit

Permalink
Remove duplicated tests (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm authored Dec 13, 2024
1 parent 3077a5e commit 62a0f19
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,48 +109,4 @@ include("test_util.jl")
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
end
end

@testset "compat" begin
include(joinpath("compat", "ad.jl"))
end

@testset "extensions" begin
include("ext/DynamicPPLMCMCChainsExt.jl")
include("ext/DynamicPPLJETExt.jl")
end

@testset "ad" begin
include("ext/DynamicPPLForwardDiffExt.jl")
include("ext/DynamicPPLMooncakeExt.jl")
include("ad.jl")
end

@testset "prob and logprob macro" begin
@test_throws ErrorException prob"..."
@test_throws ErrorException logprob"..."
end

@testset "doctests" begin
DocMeta.setdocmeta!(
DynamicPPL, :DocTestSetup, :(using DynamicPPL, Distributions); recursive=true
)
doctestfilters = [
# Older versions will show "0 element Array" instead of "Type[]".
r"(Any\[\]|0-element Array{.+,[0-9]+})",
# Older versions will show "Array{...,1}" instead of "Vector{...}".
r"(Array{.+,\s?1}|Vector{.+})",
# Older versions will show "Array{...,2}" instead of "Matrix{...}".
r"(Array{.+,\s?2}|Matrix{.+})",
# Errors from macros sometimes result in `LoadError: LoadError:`
# rather than `LoadError:`, depending on Julia version.
r"ERROR: (LoadError:\s)+",
# Older versions do not have `;;]` but instead just `]` at end of the line
# => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
r"(;;){0,1}\]$"m,
# Ignore the source of a warning in the doctest output, since this is dependent on host.
# This is a line that starts with "└ @ " and ends with the line number.
r"└ @ .+:[0-9]+",
]
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters)
end
end

0 comments on commit 62a0f19

Please sign in to comment.