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)
352352        $ generator ($ (args... )) =  $ (DynamicPPL. Model)($ evaluator, $ args_nt, $ model_gen_constructor)
353353        $ (generator_kw_form... )
354354
355-         $ model_gen =  $ model_gen_constructor
355+         $ (Base) . @__doc__   $ model_gen =  $ model_gen_constructor
356356    end 
357357end 
358358
Original file line number Diff line number Diff line change 615615
616616        @test  lp_w_threads ≈  lp_wo_threads
617617    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 
618633end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments