PEATSA/Core/Tests/UnitTests/TestEnvironment.py
def testSkipScan(self):
	
		'''Tests that not specifying scan skips checking for scan files'''
		
		#Remove the design files from the test dir
		#They could be there if another test failed
		for file in Environment.requiredPKADesignFiles:
			path = os.path.join(invalidDirectory, file)
			try:
				os.remove(path)	
			except OSError:
				#The file isn't there
				pass
								
		try:
			self.workingDirectory = Environment.WorkingDirectory(location=invalidDirectory)
			self.workingDirectory.setup(pdbFile=testPDB, scan=False, stability=True)
		except BaseException, data: 
			print data
			self.fail("Raised exception when it should not have")
		
		#Check that none of the required scan files were copied
		contents = os.listdir(invalidDirectory)
		for file in Environment.requiredPKADesignFiles:
			try: 
				contents.index(file)
				self.fail("Copied scan files (%s) when asked not to" % file)
			except ValueError:
				pass
				
		self.assertEqual(1,1)
Tests that not specifying scan skips checking for scan files
Tests that not specifying scan skips checking for scan files
Tests that not specifying scan skips checking for scan files
def testSkipScan(self):
		for file in Environment.requiredPKADesignFiles:
			path = os.path.join(invalidDirectory, file)
			try:
				os.remove(path)	
			except OSError:
				pass
		try:
			self.workingDirectory = Environment.WorkingDirectory(location=invalidDirectory)
			self.workingDirectory.setup(pdbFile=testPDB, scan=False, stability=True)
		except BaseException, data: 
			print data
			self.fail("Raised exception when it should not have")
		contents = os.listdir(invalidDirectory)
		for file in Environment.requiredPKADesignFiles:
			try: 
				contents.index(file)
				self.fail("Copied scan files (%s) when asked not to" % file)
			except ValueError:
				pass
		self.assertEqual(1,1)
def testSkipScan ( self ) : for file in Environment . requiredPKADesignFiles : path = os . path . join ( invalidDirectory , file ) try : os . remove ( path ) except OSError : pass try : self . workingDirectory = Environment . WorkingDirectory ( location = invalidDirectory ) self . workingDirectory . setup ( pdbFile = testPDB , scan = False , stability = True ) except BaseException , data : print data self . fail ( "Raised exception when it should not have" ) contents = os . listdir ( invalidDirectory ) for file in Environment . requiredPKADesignFiles : try : contents . index ( file ) self . fail ( "Copied scan files (%s) when asked not to" % file ) except ValueError : pass self . assertEqual ( 1 , 1 )
Tests that not specifying scan skips checking for scan files
Tests that not specifying scan skips checking for scan files
'''Tests that not specifying scan skips checking for scan files''' #Remove the design files from the test dir #They could be there if another test failed #The file isn't there #Check that none of the required scan files were copied
self