Ejemplo n.º 1
0
def test_get_tasks_config():
    tc = api.get_tasks_config()
    nt.assert_is_instance(tc, TasksConfigBaseMapping)
    nt.assert_count_equal(tc, [
        'test_stolos/test_get_tasks_config/depends_on2',
        'test_stolos/test_get_tasks_config/custom_job_id1',
        'test_stolos/test_get_tasks_config/app2',
        'test_stolos/test_get_tasks_config/topological_sort1',
        'test_stolos/test_get_tasks_config/fanout1',
        'test_stolos/test_get_tasks_config/depends_on1',
        'test_stolos/test_get_tasks_config/bash2',
        'test_stolos/test_get_tasks_config/app3',
        'test_stolos/test_get_tasks_config/app1',
        'test_stolos/test_get_tasks_config/bash1',
        'test_stolos/test_get_tasks_config/app4',
        'test_stolos/test_get_tasks_config/valid1',
        'test_stolos/test_get_tasks_config/valid2',
        'test_stolos/test_get_tasks_config/valid3',
        'test_stolos/test_get_tasks_config/valid3b',
        'test_stolos/test_get_tasks_config/valid4',
        'test_stolos/test_get_tasks_config/all_test1',
        'test_stolos/test_get_tasks_config/all_test2',
        'test_stolos/test_get_tasks_config/all_test3',
        'test_stolos/test_get_tasks_config/all_test4',
        'test_stolos/test_get_tasks_config/all_test4b',
        'test_stolos/test_get_tasks_config/all_test5',
        'test_stolos/test_get_tasks_config/autofill1',
        'test_stolos/test_get_tasks_config/autofill2',
        'test_stolos/test_get_tasks_config/autofill3',
        'test_stolos/test_get_tasks_config/autofill_getparents',
    ])
Ejemplo n.º 2
0
def test_get_tasks_config():
    tc = api.get_tasks_config()
    nt.assert_is_instance(tc, TasksConfigBaseMapping)
    nt.assert_count_equal(
        tc,
        ['test_stolos/test_get_tasks_config/depends_on2',
         'test_stolos/test_get_tasks_config/custom_job_id1',
         'test_stolos/test_get_tasks_config/app2',
         'test_stolos/test_get_tasks_config/topological_sort1',
         'test_stolos/test_get_tasks_config/fanout1',
         'test_stolos/test_get_tasks_config/depends_on1',
         'test_stolos/test_get_tasks_config/bash2',
         'test_stolos/test_get_tasks_config/app3',
         'test_stolos/test_get_tasks_config/app1',
         'test_stolos/test_get_tasks_config/bash1',
         'test_stolos/test_get_tasks_config/app4',
         'test_stolos/test_get_tasks_config/valid1',
         'test_stolos/test_get_tasks_config/valid2',
         'test_stolos/test_get_tasks_config/valid3',
         'test_stolos/test_get_tasks_config/valid3b',
         'test_stolos/test_get_tasks_config/valid4',
         'test_stolos/test_get_tasks_config/all_test1',
         'test_stolos/test_get_tasks_config/all_test2',
         'test_stolos/test_get_tasks_config/all_test3',
         'test_stolos/test_get_tasks_config/all_test4',
         'test_stolos/test_get_tasks_config/all_test4b',
         'test_stolos/test_get_tasks_config/all_test5',
         'test_stolos/test_get_tasks_config/autofill1',
         'test_stolos/test_get_tasks_config/autofill2',
         'test_stolos/test_get_tasks_config/autofill3',
         'test_stolos/test_get_tasks_config/autofill_getparents',
         ])
Ejemplo n.º 3
0
def test_get_job_id_template(custom_job_id1):
    tc = api.get_tasks_config()
    templ, ptempl = api.get_job_id_template(custom_job_id1)
    nt.assert_equal(templ, tc[custom_job_id1]['job_id'])
    nt.assert_equal(len(ptempl), tc[custom_job_id1]['job_id'].count('{'))
    # sanity check
    nt.assert_equal(tc[custom_job_id1]['job_id'].count('{'),
                    tc[custom_job_id1]['job_id'].count('}'))
Ejemplo n.º 4
0
def test_get_job_id_template(custom_job_id1):
    tc = api.get_tasks_config()
    templ, ptempl = api.get_job_id_template(custom_job_id1)
    nt.assert_equal(templ, tc[custom_job_id1]['job_id'])
    nt.assert_equal(len(ptempl), tc[custom_job_id1]['job_id'].count('{'))
    # sanity check
    nt.assert_equal(
        tc[custom_job_id1]['job_id'].count('{'),
        tc[custom_job_id1]['job_id'].count('}'))
Ejemplo n.º 5
0
def test_build_dag():
    dag = api.build_dag()
    nt.assert_is_instance(dag, MultiDiGraph)
    tc = api.get_tasks_config()
    nt.assert_count_equal(tc.keys(), dag.node.keys())
Ejemplo n.º 6
0
def test_build_dag():
    dag = api.build_dag()
    nt.assert_is_instance(dag, MultiDiGraph)
    tc = api.get_tasks_config()
    nt.assert_count_equal(tc.keys(), dag.node.keys())