#NEWLINE# def _defaultPathTest( self , utilFunc , check ) : #NEWLINE# #INDENT# dir = os . path . abspath ( self . mktemp ( ) ) #NEWLINE# os . makedirs ( dir ) #NEWLINE# scriptFile = self . makeSourceFile ( [ 'import os, sys, stat' , ( 'os.chmod(%r, stat.S_IXUSR)' % ( dir , ) ) , 'sys.stdout.write(os.getcwd())' ] ) #NEWLINE# self . addCleanup ( os . chdir , os . getcwd ( ) ) #NEWLINE# os . chdir ( dir ) #NEWLINE# self . addCleanup ( os . chmod , dir , stat . S_IMODE ( os . stat ( '.' ) . st_mode ) ) #NEWLINE# os . chmod ( dir , 0 ) #NEWLINE# d = utilFunc ( self . exe , [ '-u' , scriptFile ] ) #NEWLINE# d . addCallback ( check , dir ) #NEWLINE# return d