<s> """<STR_LIT>""" <EOL> import unittest <EOL> import pexpect <EOL> class testBind ( unittest . TestCase ) : <EOL> prompt = '<STR_LIT>' <EOL> def setUp ( self ) : <EOL> self . net = pexpect . spawn ( '<STR_LIT>' ) <EOL> self . net . expect ( "<STR_LIT>" ) <EOL> self . directories = [ ] <EOL> for d in self . net . match . group ( <NUM_LIT:1> ) . split ( '<STR_LIT:U+002CU+0020>' ) : <EOL> self . directories . append ( d . strip ( "<STR_LIT:'>" ) ) <EOL> self . net . expect ( self . prompt ) <EOL> self . assertTrue ( len ( self . directories ) > <NUM_LIT:0> ) <EOL> def testCreateFile ( self ) : <EOL> "<STR_LIT>" <EOL> fileName = '<STR_LIT>' <EOL> directory = self . directories [ <NUM_LIT:0> ] <EOL> path = directory + '<STR_LIT:/>' + fileName <EOL> self . net . sendline ( '<STR_LIT>' % ( path , directory ) ) <EOL> index = self . net . expect ( [ fileName , self . prompt ] ) <EOL> self . assertTrue ( index == <NUM_LIT:0> ) <EOL> self . net . expect ( self . prompt ) <EOL> self . net . sendline ( '<STR_LIT>' % path ) <EOL> self . net . expect ( self . prompt ) <EOL> def testIsolation ( self ) : <EOL> "<STR_LIT>" <EOL> fileName = '<STR_LIT>' <EOL> directory = self . directories [ <NUM_LIT:0> ] <EOL> path = directory + '<STR_LIT:/>' + fileName <EOL> contents = { '<STR_LIT>' : '<STR_LIT:1>' , '<STR_LIT>' : '<STR_LIT:2>' } <EOL> for host in contents : <EOL> value = contents [ host ] <EOL> self . net . sendline ( '<STR_LIT>' % ( host , path ) ) <EOL> self . net . expect ( '<STR_LIT>' ) <EOL> self . net . expect ( self . prompt ) <EOL> self . net . sendline ( '<STR_LIT>' % ( host , value , path ) ) <EOL> self . net . expect ( self . prompt ) <EOL> for host in contents : <EOL> value = contents [ host ] <EOL> self . net . sendline ( '<STR_LIT>' % ( host , path ) ) <EOL> self . net . expect ( value ) <EOL> self . net . expect ( self . prompt ) <EOL> self . net . sendline ( '<STR_LIT>' % ( host , path ) ) <EOL> self . net . expect ( self . prompt ) <EOL> def tearDown ( self ) : <EOL> self . net . sendline ( '<STR_LIT>' ) <EOL> self . net . wait ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
