<s> import unittest <EOL> from openmdao . main . api import Component , Assembly , set_as_top <EOL> from openmdao . main . datatypes . api import Float , Slot <EOL> class OneBase ( Component ) : <EOL> x = Float ( iotype = '<STR_LIT>' ) <EOL> class C ( Component ) : <EOL> x = Float ( iotype = '<STR_LIT>' ) <EOL> y = Float ( iotype = '<STR_LIT>' ) <EOL> def execute ( self ) : <EOL> self . y = <NUM_LIT:2> * self . x <EOL> class Example ( Assembly ) : <EOL> base = Slot ( OneBase ) <EOL> def configure ( self ) : <EOL> self . add ( '<STR_LIT>' , OneBase ( ) ) <EOL> self . add ( '<STR_LIT:c>' , C ( ) ) <EOL> self . driver . workflow . add ( [ '<STR_LIT>' , '<STR_LIT:c>' ] ) <EOL> self . connect ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . create_passthrough ( '<STR_LIT>' ) <EOL> class TestCase ( unittest . TestCase ) : <EOL> def test_twofiles ( self ) : <EOL> from sub_aning_twofiles import One <EOL> ex = set_as_top ( Example ( ) ) <EOL> ex . replace ( '<STR_LIT>' , One ( ) ) <EOL> ex . run ( ) <EOL> self . assertEqual ( ex . y , <NUM_LIT> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
