libtbx.test_utils
index
/net/chevy/raid1/rwgk/dist/libtbx/test_utils.py

 
Modules
       
Queue
difflib
libtbx.easy_run
libtbx.introspection
libtbx
math
os
sys
threading

 
Classes
       
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 x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.RuntimeError:
__new__ = <built-in method __new__ of type object at 0x723e00>
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)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
Functions
       
approx_equal(a1, a2, eps=9.9999999999999995e-07, multiplier=10000000000.0, out=<class libtbx.test_utils.Default at 0xbc02f0>, prefix='')
approx_equal_core(a1, a2, eps, multiplier, out, prefix)
block_show_diff(lines, expected, last_startswith=False)
eps_eq(a1, a2, eps=9.9999999999999995e-07, out=<class libtbx.test_utils.Default at 0xbc02f0>, prefix='')
eps_eq_core(a1, a2, eps, out, prefix)
exercise()
is_above_limit(value, limit, eps=9.9999999999999995e-07, info_high_eps=None, out=<class libtbx.test_utils.Default at 0xbc02f0>, info_prefix='INFO HIGH VALUE: ')
is_below_limit(value, limit, eps=9.9999999999999995e-07, info_low_eps=None, out=<class libtbx.test_utils.Default at 0xbc02f0>, 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=9.9999999999999995e-07, multiplier=10000000000.0)
not_eps_eq(a1, a2, eps=9.9999999999999995e-07)
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)
show_diff(a, b, selections=None, expected_number_of_lines=None)

 
Data
        Exception_expected = RuntimeError('Exception expected.',)
generators = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 0)