def test_named_evaluation_workflow(harness): """Tests creating evaluations of a workflow that uses a named evaluation of a workflow. """ test_workflow = workflow_processor.get_workflow(harness, workflow_name='test_named_evaluation') num_times = 10 evaluations = evaluation_test.test_make_evaluations(harness, test_workflow, count=num_times) print 'Evaluations: ' print evaluations print '' print '' print 'Getting the records for the evaluations: ' records = evaluation_test.test_get_evaluation_records(harness, evaluations) print 'Records: ' print records print '' print ''
def test_custom_structure_workflow(harness): """Tests creating evaluations of a workflow that uses a named evaluation of a workflow. """ test_workflow = workflow_processor.get_workflow(harness, workflow_name='get_coordinate_multiple') num_times = 10 evaluations = evaluation_test.test_make_evaluations(harness, test_workflow, count=num_times) print 'Evaluations: ' print evaluations print '' print '' print 'Getting the records for the evaluations: ' records = evaluation_test.test_get_evaluation_records(harness, evaluations) print 'Records: ' print records print '' print '' return records
def perform_fresh_filesystem_setup(profile='standard'): """Test function to blow away all harness data and recreate from filesystem. """ profile_dictionary = get_profile_dictionary(profile=profile) all_harnesses = reset_harnesses_with_components(profile=profile) harness = all_harnesses[0] print 'Test harness: ' print harness print '' print '' components = component_processor.get_all_components(harness['database']) print 'Components:' print components print '' print '' component = components[0] print 'Test component: ' print component print '' print '' print 'all functions before entry: ' print function_processor.get_current_functions(harness) print '' print '' function_getter = function_processor.get_functions_for_component_closure(harness, profile=profile, scope='internal') for component in components: functions = function_getter(component) print 'functions: ' print functions print '' print '' function_adder = component_processor.add_functions_to_component_closure(harness, source='database', profile=profile) components = map(function_adder, components) print 'updated components: ' print components print '' print '' print '' print 'Setting up structures: ' add_parameters_to_test_harness(profile, harness=harness, dictionary=profile_dictionary) print '' print '' print '' print 'Setting up the test workflows: ' test_workflow_setup(harness, profile=profile) test_workflow = workflow_test.test_get_workflow(harness, workflow_name='test_chained') print 'The test workflow: ' print test_workflow print '' print '' print 'Testing evaluation of workflow multiple times: ' number_times = 10 evaluations = evaluation_test.test_make_evaluations(harness, test_workflow, count=number_times) print 'Evaluations: ' print evaluations print '' print '' print 'Getting the records for the evaluations: ' records = evaluation_test.test_get_evaluation_records(harness, evaluations) print 'Records: ' print records print '' print '' print 'Adding a name to one of the evaluations to test: ' evaluation = evaluation_test.test_add_evaluation_name(harness, test_workflow, 'starred_evaluation') print 'Evaluation: ' print evaluation print '' print '' print 'Testing evaluation of a workflow that is dependent on the last evaluation of another workflow: ' workflow_test.test_last_evaluation_workflow(harness) print '' print '' print 'Testing evaluation of a workflow that is dependent on a named evaluation: ' workflow_test.test_named_evaluation_workflow(harness) print '' print '' print 'Testing an evaluation with a custom structure: ' test_records = workflow_test.test_custom_structure_workflow(harness) print '' print '' return test_records