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
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
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
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