File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-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 615
615
616
616
@test lp_w_threads ≈ lp_wo_threads
617
617
end
618
+
619
+ @testset " docstring" begin
620
+ " This is a test"
621
+ @model function demo (x)
622
+ m ~ Normal ()
623
+ x ~ Normal (m, 1 )
624
+ end
625
+
626
+ s = @doc (demo)
627
+ @test string (s) == " This is a test\n "
628
+
629
+ # Verify that adding docstring didn't completely break execution of model
630
+ m = demo (0. )
631
+ @test m () isa Float64
632
+ end
618
633
end
You can’t perform that action at this time.
0 commit comments