def test_write(tmpdir):
    """ Test Write """
    cfg = ProjectConfig()
    cfg.name = "foobar"
    cfg.build_depends = set(["foo", "bar"])
    cfg.run_depends = set(["foo"])
    cfg.test_depends = set(["foo", "bar", "gtest"])
    xml = tmpdir.join("project.xml")
    cfg.write(xml.strpath)
    cfg2 = ProjectConfig()
    cfg2.read(xml.strpath)
    assert cfg2 == cfg
def test_write(tmpdir):
    cfg = ProjectConfig()
    cfg.name = "foobar"
    cfg.build_depends = set(["foo", "bar"])
    cfg.run_depends = set(["foo"])
    cfg.test_depends = set(["foo", "bar", "gtest"])
    xml = tmpdir.join("project.xml")
    cfg.write(xml.strpath)

    cfg2 = ProjectConfig()
    cfg2.read(xml.strpath)

    assert cfg2 == cfg
def cfg_from_string(str, user_config=None):
    cfg_loc = StringIO(str)
    project_cfg = ProjectConfig()
    project_cfg.read(cfg_loc)
    return project_cfg
def cfg_from_string(input_str):
    """ Config From String """
    cfg_loc = StringIO(input_str)
    project_cfg = ProjectConfig()
    project_cfg.read(cfg_loc)
    return project_cfg
def cfg_from_string(input_str):
    """ Config From String """
    cfg_loc = StringIO(input_str)
    project_cfg = ProjectConfig()
    project_cfg.read(cfg_loc)
    return project_cfg
Beispiel #6
0
def cfg_from_string(str, user_config=None):
    cfg_loc = StringIO(str)
    project_cfg = ProjectConfig()
    project_cfg.read(cfg_loc)
    return project_cfg