@@ -39,8 +39,8 @@ Random.seed!(100)
39
39
40
40
include (" test_util.jl" )
41
41
42
- @testset " DynamicPPL.jl" begin
43
- @testset " interface " begin
42
+ @testset verbose = true " DynamicPPL.jl" begin
43
+ if GROUP == " All " || GROUP == " Group1 "
44
44
include (" utils.jl" )
45
45
include (" compiler.jl" )
46
46
include (" varnamedvector.jl" )
@@ -50,15 +50,60 @@ include("test_util.jl")
50
50
include (" sampler.jl" )
51
51
include (" independence.jl" )
52
52
include (" distribution_wrappers.jl" )
53
- include (" contexts.jl" )
54
- include (" context_implementations.jl" )
55
53
include (" logdensityfunction.jl" )
56
54
include (" linking.jl" )
57
- include (" threadsafe.jl" )
58
55
include (" serialization.jl" )
59
56
include (" pointwise_logdensities.jl" )
60
57
include (" lkj.jl" )
58
+ end
59
+
60
+ if GROUP == " All" || GROUP == " Group2"
61
+ include (" contexts.jl" )
62
+ include (" context_implementations.jl" )
63
+ include (" threadsafe.jl" )
61
64
include (" debug_utils.jl" )
65
+ @testset " compat" begin
66
+ include (joinpath (" compat" , " ad.jl" ))
67
+ end
68
+ @testset " extensions" begin
69
+ include (" ext/DynamicPPLMCMCChainsExt.jl" )
70
+ include (" ext/DynamicPPLJETExt.jl" )
71
+ end
72
+ @testset " ad" begin
73
+ include (" ext/DynamicPPLForwardDiffExt.jl" )
74
+ include (" ext/DynamicPPLMooncakeExt.jl" )
75
+ include (" ad.jl" )
76
+ end
77
+ @testset " prob and logprob macro" begin
78
+ @test_throws ErrorException prob " ..."
79
+ @test_throws ErrorException logprob " ..."
80
+ end
81
+ @testset " doctests" begin
82
+ DocMeta. setdocmeta! (
83
+ DynamicPPL,
84
+ :DocTestSetup ,
85
+ :(using DynamicPPL, Distributions);
86
+ recursive= true ,
87
+ )
88
+ doctestfilters = [
89
+ # Older versions will show "0 element Array" instead of "Type[]".
90
+ r" (Any\[\] |0-element Array{.+,[0-9]+})" ,
91
+ # Older versions will show "Array{...,1}" instead of "Vector{...}".
92
+ r" (Array{.+,\s ?1}|Vector{.+})" ,
93
+ # Older versions will show "Array{...,2}" instead of "Matrix{...}".
94
+ r" (Array{.+,\s ?2}|Matrix{.+})" ,
95
+ # Errors from macros sometimes result in `LoadError: LoadError:`
96
+ # rather than `LoadError:`, depending on Julia version.
97
+ r" ERROR: (LoadError:\s )+" ,
98
+ # Older versions do not have `;;]` but instead just `]` at end of the line
99
+ # => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
100
+ r" (;;){0,1}\] $" m ,
101
+ # Ignore the source of a warning in the doctest output, since this is dependent on host.
102
+ # This is a line that starts with "└ @ " and ends with the line number.
103
+ r" └ @ .+:[0-9]+" ,
104
+ ]
105
+ doctest (DynamicPPL; manual= false , doctestfilters= doctestfilters)
106
+ end
62
107
end
63
108
64
109
@testset " compat" begin
0 commit comments