|
IMP
2.0.1
The Integrative Modeling Platform
|
Super class for IMP test cases. More...
Inheritance diagram for IMP.test.TestCase:Public Member Functions | |
| def | assertClassNames |
| Check that all the classes in the module follow the imp naming conventions. More... | |
| def | assertFunctionNames |
| Check that all the functions in the module follow the imp naming conventions. More... | |
| def | assertShow |
| Check that all the classes in modulename have a show method. | |
| def | assertValueObjects |
| Check that all the C++ classes in the module are values or objects. More... | |
| def | assertXYZDerivativesInTolerance |
| Assert that x,y,z analytical derivatives match numerical within a tolerance, or a percentage (of the analytical value), whichever is larger. More... | |
| def | check_runnable_python_module |
| Check a Python module designed to be runnable with 'python -m' to make sure it supports standard command line options. More... | |
| 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. More... | |
| def | failure_probability |
| Estimate how like a given block of code is to raise an AssertionError. More... | |
| def | get_input_file_name |
| Get the full name of an input file in the top-level test directory. More... | |
| def | get_tmp_file_name |
| Get the full name of an output file in the build/tmp directory. More... | |
| def | open_input_file |
| Open and return an input file in the top-level test directory. More... | |
| 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. More... | |
| def | randomize_particles |
| Randomize the xyz coordinates of a list of particles. | |
| def | run_example |
| Run the named example script. More... | |
| def | run_python_module |
| Run a Python module as if with "python -m <modname>", with the given list of arguments as sys.argv. More... | |
Definition at line 27 of file test/__init__.py.
| def IMP.test.TestCase.assertClassNames | ( | self, | |
| module, | |||
| exceptions, | |||
| words | |||
| ) |
Definition at line 90 of file test/__init__.py.
| def IMP.test.TestCase.assertFunctionNames | ( | self, | |
| module, | |||
| exceptions, | |||
| words | |||
| ) |
Definition at line 94 of file test/__init__.py.
| def IMP.test.TestCase.assertValueObjects | ( | self, | |
| module, | |||
| exceptions | |||
| ) |
Definition at line 86 of file test/__init__.py.
| def IMP.test.TestCase.assertXYZDerivativesInTolerance | ( | self, | |
| model, | |||
| xyz, | |||
tolerance = 0, |
|||
percentage = 0 |
|||
| ) |
Definition at line 44 of file test/__init__.py.
| def IMP.test.TestCase.check_runnable_python_module | ( | self, | |
| module | |||
| ) |
Definition at line 122 of file test/__init__.py.
| def IMP.test.TestCase.create_point_particle | ( | self, | |
| model, | |||
| x, | |||
| y, | |||
| z | |||
| ) |
Definition at line 49 of file test/__init__.py.
| def IMP.test.TestCase.failure_probability | ( | self, | |
| testcall | |||
| ) |
Definition at line 60 of file test/__init__.py.
| def IMP.test.TestCase.get_input_file_name | ( | self, | |
| filename | |||
| ) |
Definition at line 30 of file test/__init__.py.
| def IMP.test.TestCase.get_tmp_file_name | ( | self, | |
| filename | |||
| ) |
Definition at line 38 of file test/__init__.py.
| def IMP.test.TestCase.open_input_file | ( | self, | |
| filename, | |||
mode = 'rb' |
|||
| ) |
Definition at line 34 of file test/__init__.py.
| def IMP.test.TestCase.probabilistic_test | ( | self, | |
| testcall, | |||
| chance_of_failure | |||
| ) |
The test is run multiple times and an exception is thrown only if it fails too many times.
Definition at line 55 of file test/__init__.py.
| def IMP.test.TestCase.run_example | ( | self, | |
| filename | |||
| ) |
A dictionary of all the script's global variables is returned. This can be queried in a test case to make sure the example performed correctly.
Definition at line 105 of file test/__init__.py.
| def IMP.test.TestCase.run_python_module | ( | self, | |
| module, | |||
| args | |||
| ) |
If module is an already-imported Python module, run its 'main' function and return the result.
If module is a string, run the module in a subprocess and return a subprocess.Popen-like object containing the child stdin, stdout and stderr.
Definition at line 117 of file test/__init__.py.