libtbx.test_utils
index
/net/chevy/raid1/nat/src/cctbx_project/libtbx/test_utils/__init__.py

 
Package Contents
       
parallel

 
Classes
       
__builtin__.object
pickle_detector
exceptions.RuntimeError(exceptions.StandardError)
RunCommandError
Default

 
class Default
    

 
class RunCommandError(exceptions.RuntimeError)
    
Method resolution order:
RunCommandError
exceptions.RuntimeError
exceptions.StandardError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.RuntimeError:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature

Data and other attributes inherited from exceptions.RuntimeError:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class pickle_detector(__builtin__.object)
     Methods defined here:
__getstate__(O)
__init__(O)
__setstate__(O, state)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
anchored_block_show_diff(lines, anchor_index, expected)
approx_equal(a1, a2, eps=1e-06, multiplier=10000000000.0, out=<class libtbx.test_utils.Default>, prefix='')
approx_equal_core(a1, a2, eps, multiplier, out, prefix)
block_show_diff(lines, expected, last_startswith=False)
blocks_show_diff(lines, expected, block_sperator='\n...\n')
compose_tmp_suffix(suffix, frames_back=0)
contains_lines(lines, expected)
contains_substring(actual, expected, failure_prefix='contains_substring() ')
eps_eq(a1, a2, eps=1e-06, out=<class libtbx.test_utils.Default>, prefix='')
eps_eq_core(a1, a2, eps, out, prefix)
exercise()
is_above_limit(value, limit, eps=1e-06, info_high_eps=None, out=<class libtbx.test_utils.Default>, info_prefix='INFO HIGH VALUE: ')
is_below_limit(value, limit, eps=1e-06, info_low_eps=None, out=<class libtbx.test_utils.Default>, info_prefix='INFO LOW VALUE: ')
iter_tests_cmd(co, build_dir, dist_dir, tst_list)
make_pick_and_run_tests(working_dir, interrupted, cmd_queue, log_queue)
not_approx_equal(a1, a2, eps=1e-06, multiplier=10000000000.0)
not_eps_eq(a1, a2, eps=1e-06)
open_tmp_directory(suffix='')
open_tmp_file(suffix='', mode='w')
precision_approx_equal(self, other, precision=24)
run_command(command, verbose=0, buffered=True, log_file_name=None, stdout_file_name=None, result_file_names=[], show_diff_log_stdout=False, sorry_expected=False, join_stdout_stderr=False)
This function starts another process to run command, with some
pre-call and post-call processing.
Before running command, the expected output files are removed:
 
  log_file_name
  stdout_file_name
  result_file_names
 
After command is finished, log_file_name and stdout_file_name are scanned
for Traceback and Sorry. An exception is raised if there are any
matches. sorry_expected=True suppresses the scanning for Sorry.
 
With buffered=True easy_run.fully_buffered() is used. If there
is any output to stderr of the child process, an exception is
raised. The run_command() return value is the result of the
easy_run.fully_buffered() call.
 
With buffered=False easy_run.call() is used. I.e. stdout and stderr
of the command are connected to stdout and stderr of the parent
process. stderr is not checked. The run_command() return value is None.
 
It is generally best to use buffered=True, and even better not to
use this function at all if command is another Python script. It
is better to organize the command script such that it can be called
directly from within the same Python process running the unit tests.
run_tests(build_dir, dist_dir, tst_list, display_times=False)
show_diff(a, b, selections=None, expected_number_of_lines=None)
test_usage(cmd)

 
Data
        Exception_expected = RuntimeError('Exception expected.',)
Exception_not_expected = RuntimeError('Exception not expected.',)
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)