Skip to content

Commit 52db39d

Browse files
committed
test the context interface for DebugContext on multiple models
1 parent b389ce4 commit 52db39d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/debug_utils.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@testset "check_model" begin
22
@testset "context interface" begin
3-
# HACK: Require a model to instantiate it, so let's just grab one.
4-
model = first(DynamicPPL.TestUtils.DEMO_MODELS)
5-
context = DynamicPPL.DebugUtils.DebugContext(model)
6-
DynamicPPL.TestUtils.test_context(context, model)
3+
@testset "$(model.f)" for model in DynamicPPL.TestUtils.DEMO_MODELS
4+
context = DynamicPPL.DebugUtils.DebugContext(model)
5+
DynamicPPL.TestUtils.test_context(context, model)
6+
end
77
end
88

99
@testset "$(model.f)" for model in DynamicPPL.TestUtils.DEMO_MODELS
@@ -14,7 +14,7 @@
1414
# Check that the trace contains all the variables in the model.
1515
varnames_in_trace = DynamicPPL.DebugUtils.varnames_in_trace(trace)
1616
for vn in DynamicPPL.TestUtils.varnames(model)
17-
@test vn in varnames_in_trace
17+
@test vn in varnames_in_traces
1818
end
1919

2020
# Quick checks for `show` of trace.

0 commit comments

Comments
 (0)