PEATSA/Core/Tests/UnitTests/TestEnvironment.py
def testMissingDesignFiles(self):
	
		'''Tests initialisation on a working directory not containing the design files
		
		If these files are missing the object should copy them there'''
		
		#Remove the design files from the test dir
		for file in Environment.requiredPKADesignFiles:
			path = os.path.join(validDirectory, file)
			os.remove(path)
		
		#The object should identify the files are missing and copy them back
		#Put stability=false to prevent copying of stability files
		try:
			object = Environment.WorkingDirectory(location=validDirectory)
			object.setup(pdbFile=testPDB, scan=True, stability=False)
		except Exception, data:
			print data
			self.fail()
			
		#Check it copied the files	
		files = os.listdir(validDirectory)
		error = ''
		for file in Environment.requiredPKADesignFiles:	
			try:
				files.index(file)
			except ValueError:
				error = error + 'File %s not copied\n' % file
				
		if len(error) != 0:
			self.fail(error)
		else:
			self.assertEqual(1,1)
Tests initialisation on a working directory not containing the design files
		
		If these files are missing the object should copy them there
Tests initialisation on a working directory not containing the design files
If these files are missing the object should copy them there
Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there
def testMissingDesignFiles(self):
		for file in Environment.requiredPKADesignFiles:
			path = os.path.join(validDirectory, file)
			os.remove(path)
		try:
			object = Environment.WorkingDirectory(location=validDirectory)
			object.setup(pdbFile=testPDB, scan=True, stability=False)
		except Exception, data:
			print data
			self.fail()
		files = os.listdir(validDirectory)
		error = ''
		for file in Environment.requiredPKADesignFiles:	
			try:
				files.index(file)
			except ValueError:
				error = error + 'File %s not copied\n' % file
		if len(error) != 0:
			self.fail(error)
		else:
			self.assertEqual(1,1)
def testMissingDesignFiles ( self ) : for file in Environment . requiredPKADesignFiles : path = os . path . join ( validDirectory , file ) os . remove ( path ) try : object = Environment . WorkingDirectory ( location = validDirectory ) object . setup ( pdbFile = testPDB , scan = True , stability = False ) except Exception , data : print data self . fail ( ) files = os . listdir ( validDirectory ) error = '' for file in Environment . requiredPKADesignFiles : try : files . index ( file ) except ValueError : error = error + 'File %s not copied\n' % file if len ( error ) != 0 : self . fail ( error ) else : self . assertEqual ( 1 , 1 )
Tests initialisation on a working directory not containing the design files
If these files are missing the object should copy them there
Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there
'''Tests initialisation on a working directory not containing the design files
		
		If these files are missing the object should copy them there''' #Remove the design files from the test dir #The object should identify the files are missing and copy them back #Put stability=false to prevent copying of stability files #Check it copied the files	
self