Module gip_testing
[hide private]
[frames] | no frames]

Module gip_testing

source code

Testing framework for the GIP.

This allows one to replace output from command-line invocations with saved outputs from the test/command_output directory.

Functions [hide private]
 
lookupCommand(cmd) source code
 
runCommand(cmd, force_command=False) source code
 
generateTests(cp, cls, args=[])
Given a class and args, generate a test case for every site in the BDII.
source code
 
streamHandler(cp)
Given the ConfigParser, find the preferred stream for test output
source code
 
runTest(cp, cls, out=None, per_site=True)
Given a test class, generate and run a test suite
source code
 
runlcginfo(opt, bdii='is.grid.iu.edu', port='2170', VO='ops') source code
 
runlcginfosites(bdii='is.grid.iu.edu', VO='ops', opts_list=[]) source code
 
interpolateConfig(cp) source code
 
getTestConfig(args) source code
Variables [hide private]
  replace_command = False
  commands = {}
Function Details [hide private]

generateTests(cp, cls, args=[])

source code 

Given a class and args, generate a test case for every site in the BDII.

Parameters:
  • cp (ConfigParser) - Site configuration
  • cls (class) - Test class to use to generate a test suite. It is assumed that the constructor for this class has signature cls(cp, site_name)
  • args - List of sites; if it is not empty, then tests will only be generated for the given sites.

streamHandler(cp)

source code 

Given the ConfigParser, find the preferred stream for test output

Parameters:
  • cp (ConfigParser) - Site configuration

runTest(cp, cls, out=None, per_site=True)

source code 

Given a test class, generate and run a test suite

Parameters:
  • cp (ConfigParser) - Site configuration
  • cls (class) - Test class to use to generate a test suite. It is assumed that the constructor for this class has signature cls(cp, site_name). If per_site=False, then the signature is assumed to be cls().
  • per_site - Set to true if there is one instance of the test class per site.
  • out (stream) - A stream where the output from the test suite is logged