<s> from robot . utils import setter <EOL> from . itemlist import ItemList <EOL> from . keyword import Keyword , Keywords <EOL> from . modelobject import ModelObject <EOL> from . tags import Tags <EOL> class TestCase ( ModelObject ) : <EOL> __slots__ = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> keyword_class = Keyword <EOL> def __init__ ( self , name = '<STR_LIT>' , doc = '<STR_LIT>' , tags = None , timeout = '<STR_LIT>' ) : <EOL> self . parent = None <EOL> self . name = name <EOL> self . doc = doc <EOL> self . tags = tags <EOL> self . timeout = timeout <EOL> self . keywords = [ ] <EOL> @ setter <EOL> def tags ( self , tags ) : <EOL> return Tags ( tags ) <EOL> @ setter <EOL> def keywords ( self , keywords ) : <EOL> return Keywords ( self . keyword_class , self , keywords ) <EOL> @ property <EOL> def id ( self ) : <EOL> if not self . parent : <EOL> return '<STR_LIT>' <EOL> return '<STR_LIT>' % ( self . parent . id , self . parent . tests . index ( self ) + <NUM_LIT:1> ) <EOL> @ property <EOL> def longname ( self ) : <EOL> if not self . parent : <EOL> return self . name <EOL> return '<STR_LIT>' % ( self . parent . longname , self . name ) <EOL> @ property <EOL> def critical ( self ) : <EOL> if not self . parent : <EOL> return True <EOL> return self . parent . criticality . test_is_critical ( self ) <EOL> def visit ( self , visitor ) : <EOL> visitor . visit_test ( self ) <EOL> class TestCases ( ItemList ) : <EOL> __slots__ = [ ] <EOL> def __init__ ( self , test_class = TestCase , parent = None , tests = None ) : <EOL> ItemList . __init__ ( self , test_class , { '<STR_LIT>' : parent } , tests ) </s>
