예제 #1
0
def test_abbrev_nodenames_nochange_cobalt():
    env_resources = EnvResources()
    # Test Cobalt abbrev
    exp_names = ['21', '22', '137', '138', '1234', '11234']
    env_resources.schedular = 'Cobalt'
    abbrev_names = env_resources.abbrev_nodenames(exp_names)
    assert abbrev_names == exp_names, "Abbreviated names returned do not match expected"
    del env_resources
예제 #2
0
def test_abbrev_nodenames_nochange_slurm():
    env_resources = EnvResources()
    # Test Slurm abbrev
    exp_names = ['knl-0019', 'knl-0021', 'knl-0022', 'knl-0137', 'knl-0138', 'knl-0139', 'knl-2345']
    env_resources.schedular = 'Slurm'
    abbrev_names = env_resources.abbrev_nodenames(exp_names)
    assert abbrev_names == exp_names, "Abbreviated names returned do not match expected"
    del env_resources
예제 #3
0
def test_abbrev_nodenames_slurm():
    env_resources = EnvResources()
    # Test Slurm abbrev
    exp_names = ['knl-0019', 'knl-0021', 'knl-0022']
    full_names = ['knl-0019.some.suffix', 'knl-0021.some.suffix', 'knl-0022.diff_suffix']
    env_resources.schedular = 'Slurm'
    abbrev_names = env_resources.abbrev_nodenames(full_names)
    assert abbrev_names == exp_names, "Abbreviated names returned do not match expected"
    del env_resources