File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ function build_output(model_info)
352
352
$ generator ($ (args... )) = $ (DynamicPPL. Model)($ evaluator, $ args_nt, $ model_gen_constructor)
353
353
$ (generator_kw_form... )
354
354
355
- $ model_gen = $ model_gen_constructor
355
+ $ (Base) . @__doc__ $ model_gen = $ model_gen_constructor
356
356
end
357
357
end
358
358
Original file line number Diff line number Diff line change 580
580
model = demo ()
581
581
@test all (iszero (model ()) for _ in 1 : 1000 )
582
582
end
583
+ @testset " docstring" begin
584
+ " This is a test"
585
+ @model function demo (x)
586
+ m ~ Normal ()
587
+ x ~ Normal (m, 1 )
588
+ end
589
+
590
+ s = @doc (demo)
591
+ @test string (s) == " This is a test\n "
592
+
593
+ # Verify that adding docstring didn't completely break execution of model
594
+ m = demo (0. )
595
+ @test m () isa Float64
596
+ end
583
597
end
You can’t perform that action at this time.
0 commit comments