Exemple #1
0
def test_combine_sections(ini_file, expected):
    cfg_ini = ConfigParser.ConfigParser()
    cfg_ini.read(os.path.join(os.path.dirname(__file__), ini_file))
    assert {
        section.name: section.merged_options
        for section in combine_sections(parse_sections(cfg_ini))
    } == expected
Exemple #2
0
def test_parse_sections(ini_file, expected):
    cfg_ini = ConfigParser.ConfigParser()
    cfg_ini.read(os.path.join(os.path.dirname(__file__), ini_file))
    assert {
        section.name: section.plugin
        for section in parse_sections(cfg_ini)
    } == expected
Exemple #3
0
def test_combine_sections(ini_file, expected):
    cfg_ini = ConfigParser.ConfigParser()
    cfg_ini.read(os.path.join(os.path.dirname(__file__), ini_file))
    assert {section.name: section.merged_options for section in combine_sections(parse_sections(cfg_ini))} == expected
Exemple #4
0
def test_parse_sections(ini_file, expected):
    cfg_ini = ConfigParser.ConfigParser()
    cfg_ini.read(os.path.join(os.path.dirname(__file__), ini_file))
    assert {section.name: section.plugin for section in parse_sections(cfg_ini)} == expected