• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

contrib/opal/ZSI/ZSI/wstools/test/test_wstools.py

00001 #!/usr/bin/env python
00002 
00003 ############################################################################
00004 # Joshua R. Boverhof, David W. Robertson, LBNL
00005 # See LBNLCopyright for copyright notice!
00006 ###########################################################################
00007 
00008 import unittest, tarfile, os, ConfigParser
00009 import test_wsdl
00010 
00011 
00012 SECTION='files'
00013 CONFIG_FILE = 'config.txt'
00014 
00015 def extractFiles(section, option):
00016     config = ConfigParser.ConfigParser()
00017     config.read(CONFIG_FILE)
00018     archives = config.get(section, option)
00019     archives = eval(archives)
00020     for file in archives:
00021         tar = tarfile.open(file)
00022         if not os.access(tar.membernames[0], os.R_OK):
00023             for i in tar.getnames(): 
00024                 tar.extract(i)
00025 
00026 def makeTestSuite():
00027     suite = unittest.TestSuite()
00028     suite.addTest(test_wsdl.makeTestSuite("services_by_file"))
00029     return suite
00030 
00031 def main():
00032     extractFiles(SECTION, 'archives')
00033     unittest.main(defaultTest="makeTestSuite")
00034 
00035 if __name__ == "__main__" : main()
00036     
00037 

Generated on Wed Oct 20 2010 11:12:17 for APBS by  doxygen 1.7.2