def _set_attributes_clean(test, data):
 test_type = {'client': 1, 'server': 2}
 test_time = {'short': 1, 'medium': 2, 'long': 3}
 test.test_type = test_type[data.test_type.lower()]
 test.test_time = test_time[data.time.lower()]
 string_attributes = ('name', 'author', 'test_class', 'test_category', 'test_category', 'sync_count')
 for attribute in string_attributes:
  setattr(test, attribute, getattr(data, attribute))
 test.description = data.doc
 test.dependencies = ', '.join(data.dependencies)
 int_attributes = ('experimental', 'run_verify')
 for attribute in int_attributes:
  setattr(test, attribute, int(getattr(data, attribute)))

def _set_attributes_clean ( test , data ) : test_type = { 'client' : 1 , 'server' : 2 } test_time = { 'short' : 1 , 'medium' : 2 , 'long' : 3 } test . test_type = test_type [ data . test_type . lower ( ) ] test . test_time = test_time [ data . time . lower ( ) ] string_attributes = ( 'name' , 'author' , 'test_class' , 'test_category' , 'test_category' , 'sync_count' ) for attribute in string_attributes : setattr ( test , attribute , getattr ( data , attribute ) ) test . description = data . doc test . dependencies = ', ' . join ( data . dependencies ) int_attributes = ( 'experimental' , 'run_verify' ) for attribute in int_attributes : setattr ( test , attribute , int ( getattr ( data , attribute ) ) )
first pass sets the attributes of the test object from file system .