File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 11# Changelog  
22
33## [ Unreleased]  
4+ ### Fixed  
5+ -  Issue [ #375  ] ( https://github.com/reportportal/agent-python-pytest/issues/375 ) : Fix max Item name length, by @HardNorth  
46### Added  
5- Issue [ #332  ] ( https://github.com/reportportal/agent-python-pytest/issues/332 ) : Support for fixture reporting, by @HardNorth  
7+ -   Issue [ #332  ] ( https://github.com/reportportal/agent-python-pytest/issues/332 ) : Support for fixture reporting, by @HardNorth  
68
79## [ 5.4.2]  
810### Fixed  
Original file line number Diff line number Diff line change @@ -358,21 +358,16 @@ def collect_tests(self, session: Session) -> None:
358358            self ._merge_code (test_tree )
359359        self ._build_item_paths (test_tree , [])
360360
361-     def  _get_item_name (self , name ) :
361+     def  _get_item_name (self , name :  str )  ->   str :
362362        """Get name of item. 
363363
364-         :param name: Item name 
365-         :return: name 
364+         :param name: Test  Item name 
365+         :return: truncated to maximum length  name if needed  
366366        """ 
367367        if  len (name ) >  MAX_ITEM_NAME_LENGTH :
368-             name  =  name [:MAX_ITEM_NAME_LENGTH  -  len (TRUNCATION_STR )] +  \
369-                    TRUNCATION_STR 
370-             log .warning (
371-                 PytestWarning (
372-                     'Test leaf ID was truncated to "{}" because of name size ' 
373-                     'constrains on Report Portal' .format (name )
374-                 )
375-             )
368+             name  =  name [:MAX_ITEM_NAME_LENGTH  -  len (TRUNCATION_STR )] +  TRUNCATION_STR 
369+             log .warning (PytestWarning (
370+                 f'Test leaf ID was truncated to "{ name }  " because of name size constrains on Report Portal' ))
376371        return  name 
377372
378373    def  _get_item_description (self , test_item ):
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments