File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 178178nlocals: 3 
179179flags: 3 
180180consts: ("'hello'", "'world'") 
181+ 
182+ >>> class class_with_docstring: 
183+ ...     '''This is a docstring for class''' 
184+ ...     pass 
185+ 
186+ >>> print(class_with_docstring.__doc__) 
187+ This is a docstring for class 
188+ 
189+ >>> class class_without_docstring: 
190+ ...     pass 
191+ 
192+ >>> print(class_without_docstring.__doc__) 
193+ None 
181194""" 
182195
183196import  copy 
Original file line number Diff line number Diff line change @@ -344,6 +344,7 @@ def test_lambda_doc(self):
344344    def  test_lambda_consts (self ):
345345        l  =  lambda : "this is the only const" 
346346        self .assertEqual (len (l .__code__ .co_consts ), 1 )
347+         self .assertEqual (l .__code__ .co_consts [0 ], "this is the only const" )
347348
348349    def  test_encoding (self ):
349350        code  =  b'# -*- coding: badencoding -*-\n pass\n ' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments