ensembl-hive-python3  2.7.0
eHive.params.ParamContainerTestSubstitutions Class Reference
+ Inheritance diagram for eHive.params.ParamContainerTestSubstitutions:

Public Member Functions

def setUp (self)
 
def assertSubstitution (self, param_string, expected_value, msg)
 Helper method to execute the substitution and check the result. More...
 
def test_values (self)
 
def test_numbers (self)
 
def test_lists (self)
 
def test_dictionaries (self)
 
def test_maths_methods (self)
 
def test_indexes (self)
 
def test_param_modification (self)
 

Public Attributes

 params
 

Static Public Attributes

 TestParamEntry = collections.namedtuple('TestParamEntry', ['name', 'seed_value', 'eval_value'])
 
tuple seed_params_list
 
dictionary seed_params_dict = {p.name: p.seed_value for p in seed_params_list}
 

Detailed Description

Definition at line 253 of file params.py.

Member Function Documentation

◆ assertSubstitution()

def eHive.params.ParamContainerTestSubstitutions.assertSubstitution (   self,
  param_string,
  expected_value,
  msg 
)

Helper method to execute the substitution and check the result.

Definition at line 288 of file params.py.

+ Here is the caller graph for this function:

◆ setUp()

def eHive.params.ParamContainerTestSubstitutions.setUp (   self)

Definition at line 284 of file params.py.

◆ test_dictionaries()

def eHive.params.ParamContainerTestSubstitutions.test_dictionaries (   self)

Definition at line 325 of file params.py.

+ Here is the call graph for this function:

◆ test_indexes()

def eHive.params.ParamContainerTestSubstitutions.test_indexes (   self)

Definition at line 364 of file params.py.

+ Here is the call graph for this function:

◆ test_lists()

def eHive.params.ParamContainerTestSubstitutions.test_lists (   self)

Definition at line 303 of file params.py.

+ Here is the call graph for this function:

◆ test_maths_methods()

def eHive.params.ParamContainerTestSubstitutions.test_maths_methods (   self)

Definition at line 347 of file params.py.

+ Here is the call graph for this function:

◆ test_numbers()

def eHive.params.ParamContainerTestSubstitutions.test_numbers (   self)

Definition at line 296 of file params.py.

+ Here is the call graph for this function:

◆ test_param_modification()

def eHive.params.ParamContainerTestSubstitutions.test_param_modification (   self)

Definition at line 371 of file params.py.

◆ test_values()

def eHive.params.ParamContainerTestSubstitutions.test_values (   self)

Definition at line 292 of file params.py.

Member Data Documentation

◆ params

eHive.params.ParamContainerTestSubstitutions.params

Definition at line 285 of file params.py.

◆ seed_params_dict

dictionary eHive.params.ParamContainerTestSubstitutions.seed_params_dict = {p.name: p.seed_value for p in seed_params_list}
static

Definition at line 282 of file params.py.

◆ seed_params_list

tuple eHive.params.ParamContainerTestSubstitutions.seed_params_list
static
Initial value:
= (
TestParamEntry('alpha', 2, 2),
TestParamEntry('beta', 5, 5),
TestParamEntry('delta', '#expr( #alpha#*#beta# )expr#', 10),
TestParamEntry('epsilon', 'alpha#beta', 'alpha#beta'), # Single hash -> no substitution
TestParamEntry('gamma', [10, 20, 33, 15], [10, 20, 33, 15]),
TestParamEntry('gamma_prime', '#expr( #gamma# )expr#', [10, 20, 33, 15]),
TestParamEntry('gamma_second', '#expr( list(#gamma#) )expr#', [10, 20, 33, 15]),
TestParamEntry('age', {'Alice': 17, 'Bob': 20, 'Chloe': 21}, {'Alice': 17, 'Bob': 20, 'Chloe': 21}),
TestParamEntry('age_prime', '#expr( #age# )expr#', {'Alice': 17, 'Bob': 20, 'Chloe': 21}),
TestParamEntry('age_second', '#expr( dict(#age#) )expr#', {'Alice': 17, 'Bob': 20, 'Chloe': 21}),
TestParamEntry('csv', '[123,456,789]', '[123,456,789]'),
TestParamEntry('csv_prime', '#expr( #csv# )expr#', '[123,456,789]'),
TestParamEntry('listref', '#expr( eval(#csv#) )expr#', [123, 456, 789]),
TestParamEntry('null', None, None),
TestParamEntry('ref_null', '#null#', None),
TestParamEntry('ref2_null', '#expr( #null# )expr#', None),
TestParamEntry('ref3_null', '#alpha##null##beta#', '2None5'),
)

Definition at line 259 of file params.py.

◆ TestParamEntry

eHive.params.ParamContainerTestSubstitutions.TestParamEntry = collections.namedtuple('TestParamEntry', ['name', 'seed_value', 'eval_value'])
static

Definition at line 256 of file params.py.


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