<s> """<STR_LIT>""" <EOL> import sys <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> import unittest2 as unittest <EOL> else : <EOL> import unittest <EOL> import os <EOL> from ioflo . test import testing <EOL> from ioflo . aid . consoling import getConsole <EOL> console = getConsole ( ) <EOL> from ioflo . base import acting <EOL> from ioflo . base import doing <EOL> from ioflo . base import storing <EOL> def setUpModule ( ) : <EOL> console . reinit ( verbosity = console . Wordage . concise ) <EOL> def tearDownModule ( ) : <EOL> pass <EOL> class BasicTestCase ( testing . FrameIofloTestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( BasicTestCase , self ) . setUp ( ) <EOL> def tearDown ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( BasicTestCase , self ) . tearDown ( ) <EOL> def testActify ( self ) : <EOL> """<STR_LIT>""" <EOL> console . terse ( "<STR_LIT>" . format ( self . testActify . __doc__ ) ) <EOL> @ acting . actify ( "<STR_LIT>" ) <EOL> def bearded ( self , x = <NUM_LIT:1> , y = <NUM_LIT:2> ) : <EOL> """<STR_LIT>""" <EOL> z = x + y <EOL> return ( self , z ) <EOL> self . assertIn ( "<STR_LIT>" , acting . Actor . Registry ) <EOL> actor , inits , ioinits , parms = acting . Actor . __fetch__ ( "<STR_LIT>" ) <EOL> self . assertIs ( actor . _Parametric , True ) <EOL> self . assertDictEqual ( actor . Inits , { } ) <EOL> self . assertDictEqual ( actor . Ioinits , { } ) <EOL> self . assertDictEqual ( actor . Parms , { } ) <EOL> self . assertDictEqual ( inits , { } ) <EOL> self . assertDictEqual ( ioinits , { } ) <EOL> self . assertDictEqual ( parms , { } ) <EOL> actor = actor ( ) <EOL> self . assertIsInstance ( actor , acting . Actor ) <EOL> self . assertEqual ( actor . __class__ . __name__ , "<STR_LIT>" ) <EOL> if sys . version > '<STR_LIT:3>' : <EOL> self . assertEqual ( actor . action . __self__ . __class__ . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( actor . action . __func__ , bearded ) <EOL> self . assertIs ( actor . action . __self__ , actor ) <EOL> else : <EOL> self . assertEqual ( actor . action . im_class . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( actor . action . im_func , bearded ) <EOL> self . assertIs ( actor . action . im_self , actor ) <EOL> self . assertEqual ( actor . action . __doc__ , '<STR_LIT>' ) <EOL> self . assertEqual ( actor . action . __name__ , '<STR_LIT>' ) <EOL> me , z = actor ( ) <EOL> self . assertIs ( me , actor ) <EOL> self . assertEqual ( z , <NUM_LIT:3> ) <EOL> def testDoify ( self ) : <EOL> """<STR_LIT>""" <EOL> console . terse ( "<STR_LIT>" . format ( self . testDoify . __doc__ ) ) <EOL> @ doing . doify ( "<STR_LIT>" ) <EOL> def blackened ( self , x = <NUM_LIT:3> , y = <NUM_LIT:2> ) : <EOL> """<STR_LIT>""" <EOL> z = x + y <EOL> return ( self , z ) <EOL> self . assertIn ( "<STR_LIT>" , doing . Doer . Registry ) <EOL> actor , inits , ioinits , parms = doing . Doer . __fetch__ ( "<STR_LIT>" ) <EOL> self . assertIs ( actor . _Parametric , False ) <EOL> self . assertDictEqual ( actor . Inits , { } ) <EOL> self . assertDictEqual ( actor . Ioinits , { } ) <EOL> self . assertDictEqual ( actor . Parms , { } ) <EOL> self . assertDictEqual ( inits , { } ) <EOL> self . assertDictEqual ( ioinits , { } ) <EOL> self . assertDictEqual ( parms , { } ) <EOL> actor = actor ( ) <EOL> self . assertIsInstance ( actor , doing . Doer ) <EOL> self . assertEqual ( actor . __class__ . __name__ , "<STR_LIT>" ) <EOL> if sys . version > '<STR_LIT:3>' : <EOL> self . assertEqual ( actor . action . __self__ . __class__ . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( actor . action . __func__ , blackened ) <EOL> self . assertIs ( actor . action . __self__ , actor ) <EOL> else : <EOL> self . assertEqual ( actor . action . im_class . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( actor . action . im_func , blackened ) <EOL> self . assertIs ( actor . action . im_self , actor ) <EOL> self . assertEqual ( actor . action . __doc__ , '<STR_LIT>' ) <EOL> self . assertEqual ( actor . action . __name__ , '<STR_LIT>' ) <EOL> me , z = actor ( ) <EOL> self . assertIs ( me , actor ) <EOL> self . assertEqual ( z , <NUM_LIT:5> ) <EOL> def testFrameDoer ( self ) : <EOL> """<STR_LIT>""" <EOL> console . terse ( "<STR_LIT>" . format ( self . testFrameDoer . __doc__ ) ) <EOL> @ doing . doify ( "<STR_LIT>" ) <EOL> def action ( self , a = "<STR_LIT>" , ** kwa ) : <EOL> """<STR_LIT>""" <EOL> share = self . store . create ( "<STR_LIT>" ) . update ( value = a ) <EOL> self . assertIn ( "<STR_LIT>" , doing . Doer . Registry ) <EOL> act = self . addDoer ( "<STR_LIT>" ) <EOL> self . assertIsInstance ( act , acting . Act ) <EOL> self . assertIn ( act , self . frame . reacts ) <EOL> self . assertEqual ( act . actor , "<STR_LIT>" ) <EOL> self . assertEqual ( act . frame , self . frame . name ) <EOL> self . resolve ( ) <EOL> self . assertIs ( act . frame , self . frame ) <EOL> self . assertIs ( act . frame . framer , self . framer ) <EOL> self . assertIs ( act . actor . store , self . store ) <EOL> self . assertIn ( act . actor . name , doing . Doer . Registry ) <EOL> self . assertEqual ( act . actor . name , "<STR_LIT>" ) <EOL> self . assertIsInstance ( act . actor , doing . Doer ) <EOL> self . assertEqual ( act . actor . __class__ . __name__ , "<STR_LIT>" ) <EOL> if sys . version > '<STR_LIT:3>' : <EOL> self . assertEqual ( act . actor . action . __self__ . __class__ . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( act . actor . action . __func__ , action ) <EOL> self . assertIs ( act . actor . action . __self__ , act . actor ) <EOL> else : <EOL> self . assertEqual ( act . actor . action . im_class . __name__ , "<STR_LIT>" ) <EOL> self . assertIs ( act . actor . action . im_func , action ) <EOL> self . assertIs ( act . actor . action . im_self , act . actor ) <EOL> self . assertEqual ( act . actor . action . __doc__ , '<STR_LIT>' ) <EOL> self . assertEqual ( act . actor . action . __name__ , '<STR_LIT:action>' ) <EOL> self . assertIs ( self . store . fetch ( "<STR_LIT>" ) , None ) <EOL> self . frame . recur ( ) <EOL> share = self . store . fetch ( "<STR_LIT>" ) <EOL> self . assertIsInstance ( share , storing . Share ) <EOL> self . assertEqual ( share . value , "<STR_LIT>" ) <EOL> def runOne ( test ) : <EOL> '''<STR_LIT>''' <EOL> test = BasicTestCase ( test ) <EOL> suite = unittest . TestSuite ( [ test ] ) <EOL> unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) . run ( suite ) <EOL> def runSome ( ) : <EOL> """<STR_LIT>""" <EOL> tests = [ ] <EOL> names = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , ] <EOL> tests . extend ( map ( BasicTestCase , names ) ) <EOL> suite = unittest . TestSuite ( tests ) <EOL> unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) . run ( suite ) <EOL> def runAll ( ) : <EOL> """<STR_LIT>""" <EOL> suite = unittest . TestSuite ( ) <EOL> suite . addTest ( unittest . TestLoader ( ) . loadTestsFromTestCase ( BasicTestCase ) ) <EOL> unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) . run ( suite ) <EOL> if __name__ == '<STR_LIT:__main__>' and __package__ is None : <EOL> runSome ( ) </s>
