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]
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]
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")
def test_load_config(): ctools.load_config()
def test_bznum(): cf = ctools.load_config() s, bz = cf._get_stage_bznum() assert bz == "08" assert s == 3
def _load_configuration(path): configfile = os.path.join(path, DEFAULT_CONFIG_FILE) return ctools.load_config(configfile)