コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
def cfg_from_string(str, user_config=None):
    cfg_loc = StringIO(str)
    project_cfg = ProjectConfig()
    project_cfg.read(cfg_loc)
    return project_cfg
コード例 #4
0
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
コード例 #5
0
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
コード例 #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