Пример #1
0
def test_cobalt_nodelist_reverse_grp():
    os.environ["LIBE_RESOURCES_TEST_NODE_LIST"] = "20-22,139-137,1234"
    exp_out = [
        'nid00020', 'nid00021', 'nid00022', 'nid00137', 'nid00138', 'nid00139',
        'nid01234'
    ]
    nodelist = Resources.get_cobalt_nodelist(
        node_list_env="LIBE_RESOURCES_TEST_NODE_LIST")
    assert nodelist == exp_out, "Nodelist returned is does not match expected"
Пример #2
0
def test_cobalt_nodelist_single():
    os.environ["LIBE_RESOURCES_TEST_NODE_LIST"] = "56"
    exp_out = ["nid00056"]
    nodelist = Resources.get_cobalt_nodelist(
        node_list_env="LIBE_RESOURCES_TEST_NODE_LIST")
    assert nodelist == exp_out, "Nodelist returned is does not match expected"
Пример #3
0
def test_cobalt_nodelist_seq():
    os.environ["LIBE_RESOURCES_TEST_NODE_LIST"] = "9-12"
    exp_out = ['nid00009', 'nid00010', 'nid00011', 'nid00012']
    nodelist = Resources.get_cobalt_nodelist(
        node_list_env="LIBE_RESOURCES_TEST_NODE_LIST")
    assert nodelist == exp_out, "Nodelist returned is does not match expected"
Пример #4
0
def test_cobalt_nodelist_empty():
    os.environ["LIBE_RESOURCES_TEST_NODE_LIST"] = ""
    exp_out = []  #empty
    nodelist = Resources.get_cobalt_nodelist(
        node_list_env="LIBE_RESOURCES_TEST_NODE_LIST")
    assert nodelist == exp_out, "Nodelist returned is does not match expected"