IMP Reference Guide
2.6.1
The Integrative Modeling Platform
|
Support for running tests of IMP functionality. More...
Support for running tests of IMP functionality.
Most of this is centered around the Python unittest
module.
Author(s): Ben Webb, Daniel Russel
Maintainer: benmwebb
License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Publications:
Classes | |
class | ApplicationTestCase |
Super class for simple IMP application test cases. More... | |
class | DirectorObjectChecker |
Check to make sure the number of director references is as expected. More... | |
class | RefCountChecker |
Check to make sure the number of C++ object references is as expected. More... | |
class | RunInTempDir |
Simple RAII-style class to run in a temporary directory. More... | |
class | TempDir |
Simple RAII-style class to make a temporary directory. More... | |
class | TestCase |
Super class for IMP test cases. More... | |
Functions | |
def | main |
Run a set of tests; similar to unittest.main(). More... | |
def | numerical_derivative |
Calculate the derivative of the single-value function func at point val . More... | |
def | xyz_numerical_derivatives |
Calculate the x,y and z derivatives of the scoring function sf on the xyz particle. More... | |
Standard module functions | |
All | |
std::string | get_module_version () |
std::string | get_module_name () |
std::string | get_data_path (std::string file_name) |
Return the full path to one of this module's data files. More... | |
std::string | get_example_path (std::string file_name) |
Return the full path to one of this module's example files. More... | |
std::string IMP::test::get_data_path | ( | std::string | file_name | ) |
Return the full path to one of this module's data files.
To read the data file "data_library" that was placed in the data
directory of this module, do something like
This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh
script.
std::string IMP::test::get_example_path | ( | std::string | file_name | ) |
Return the full path to one of this module's example files.
To read the example file "example_protein.pdb" that was placed in the examples
directory of this module, do something like
This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh
script.
def IMP.test.main | ( | args, | |
keys | |||
) |
Run a set of tests; similar to unittest.main().
Obviates the need to separately import the 'unittest' module, and ensures that main() is from the same unittest module that the IMP.test testcases are. In addition, turns on some extra checks (e.g. trying to use deprecated code will cause an exception to be thrown).
Definition at line 1054 of file test/__init__.py.
def IMP.test.numerical_derivative | ( | func, | |
val, | |||
step | |||
) |
Calculate the derivative of the single-value function func
at point val
.
The derivative is calculated using simple finite differences starting with the given step
; Richardson extrapolation is then used to extrapolate the derivative at step=0.
Definition at line 434 of file test/__init__.py.
def IMP.test.xyz_numerical_derivatives | ( | sf, | |
xyz, | |||
step | |||
) |
Calculate the x,y and z derivatives of the scoring function sf
on the xyz
particle.
The derivatives are approximated numerically using the numerical_derivatives() function.
Definition at line 470 of file test/__init__.py.