IMP logo
Public Member Functions
IMP.test.ApplicationTestCase Class Reference

Detailed Description

Super class for simple IMP application test cases.

+ Inheritance diagram for IMP.test.ApplicationTestCase:

List of all members.

Public Member Functions

def assertApplicationExitedCleanly
 Assert that the application exited cleanly, i.e.
def import_python_application
 Import an installed Python application, rather than running it.
def run_application
 Run an application with the given list of arguments.
def run_python_application
 Run a Python application with the given list of arguments.
def run_script
 Run an application with the given list of arguments.
- Public Member Functions inherited from IMP.test.TestCase
def assertClassNames
 Check that all the classes in the module follow the imp naming conventions.
def assertFunctionNames
 Check that all the functions in the module follow the imp naming conventions.
def assertShow
 Check that all the classes in modulename have a show method.
def assertValueObjects
def assertXYZDerivativesInTolerance
 Assert that x,y,z analytical derivatives match numerical within a tolerance, or a percentage (of the analytical value), whichever is larger.
def check_unary_function_deriv
 Check the unary function func's derivatives against numerical approximations between lb and ub.
def check_unary_function_min
 Make sure that the minimum of the unary function func over the range between lb and ub is at expected_fmin.
def create_particles_in_box
 Create a bunch of particles in a box.
def create_point_particle
 Make a particle with optimizable x, y and z attributes, and add it to the model.
def failure_probability
 Estimate how like a given block of code is to raise an AssertionError.
def get_input_file_name
 Get the full name of an input file in the top-level test directory.
def get_magnitude
def get_tmp_file_name
 Get the full name of an output file in the build/tmp directory.
def open_input_file
 Open and return an input file in the top-level test directory.
def particle_distance
 Return distance between two given particles.
def probabilistic_test
 Help handle a test which is expected to fail some fraction of the time.
def randomize_particles
 Randomize the xyz coordinates of a list of particles.
def run_example
 Run the named example script.
def setUp
def tearDown

Additional Inherited Members

- Public Attributes inherited from IMP.test.TestCase
 start_time
 words

Member Function Documentation

def IMP.test.ApplicationTestCase.assertApplicationExitedCleanly (   self,
  ret,
  error 
)

Assert that the application exited cleanly, i.e.

that the return value is zero.

def IMP.test.ApplicationTestCase.import_python_application (   self,
  app 
)

Import an installed Python application, rather than running it.

This is useful to directly test components of the application.

Returns:
the Python module object.
def IMP.test.ApplicationTestCase.run_application (   self,
  app,
  args 
)

Run an application with the given list of arguments.

Returns:
a subprocess.Popen-like object containing the child stdin, stdout and stderr.
def IMP.test.ApplicationTestCase.run_python_application (   self,
  app,
  args 
)

Run a Python application with the given list of arguments.

The Python application should be self-runnable (i.e. it should be executable and with a #! on the first line).

Returns:
a subprocess.Popen-like object containing the child stdin, stdout and stderr.
def IMP.test.ApplicationTestCase.run_script (   self,
  app,
  args 
)

Run an application with the given list of arguments.

Returns:
a subprocess.Popen-like object containing the child stdin, stdout and stderr.

The documentation for this class was generated from the following file:

Generated on Tue May 22 2012 23:33:37 for IMP by doxygen 1.8.1