예제 #1
0
def test_frameindexgen():
    cf = ctools.load_config()
    cf.templateSkipNums = [3, 9]
    cf.numTemplates = 10
    cf.templateNumOffset = 1
    cf.templateNumStep = 2
    frms = cf._get_frame_index_iterator()
    assert list(frms) == [0, 1, 2]
예제 #2
0
def test_framelist():
    cf = ctools.load_config()
    cf.templateSkipNums = [3, 9]
    cf.numTemplates = 10
    cf.templateNumOffset = 1
    cf.templateNumStep = 2
    frms = cf._get_frame_list()
    assert frms == [1, 5, 7]
예제 #3
0
def test_write_config():
    dummy = ctools.load_config()
    ctools.write_config(dummy, "test_config.par")
    assert os.path.isfile("test_config.par")
    os.remove("test_config.par")
예제 #4
0
def test_load_config():
    ctools.load_config()
예제 #5
0
def test_bznum():
    cf = ctools.load_config()
    s, bz = cf._get_stage_bznum()
    assert bz == "08"
    assert s == 3
예제 #6
0
def _load_configuration(path):
    configfile = os.path.join(path, DEFAULT_CONFIG_FILE)
    return ctools.load_config(configfile)