Example #1
0
def test_dmfconfig_attrs(dmfconfig_tmp):
    config = DMFConfig()
    assert config.workspace is not None
Example #2
0
def test_dmfconfig_save(dmfconfig_tmp):
    config = DMFConfig()
    config.save()
Example #3
0
def test_dmfconfig_save_nofile(dmfconfig_none):
    config = DMFConfig()
    pytest.raises(IOError, config.save)
Example #4
0
def test_dmfconfig_somefile(dmfconfig_tmp):
    dmfconfig_tmp.write("workspace: foobar\n")
    dmfconfig_tmp.flush()
    config = DMFConfig()
Example #5
0
def test_dmfconfig_init_defaults2(dmfconfig_tmp):
    config = DMFConfig(defaults={"look": "here"})
    assert config.c["look"] == "here"
Example #6
0
def test_dmfconfig_init_defaults_emptyfile(dmfconfig_tmp):
    config = DMFConfig()
    assert config.c == DMFConfig.DEFAULTS
Example #7
0
def test_dmfconfig_init_defaults_nofile(dmfconfig_none):
    config = DMFConfig()
    assert config.c == DMFConfig.DEFAULTS
Example #8
0
def test_dmfconfig_init_defaults2(dmfconfig_tmp):
    config = DMFConfig(defaults={'look': 'here'})
    assert config.c['look'] == 'here'