def test_dmfconfig_attrs(dmfconfig_tmp): config = DMFConfig() assert config.workspace is not None
def test_dmfconfig_save(dmfconfig_tmp): config = DMFConfig() config.save()
def test_dmfconfig_save_nofile(dmfconfig_none): config = DMFConfig() pytest.raises(IOError, config.save)
def test_dmfconfig_somefile(dmfconfig_tmp): dmfconfig_tmp.write("workspace: foobar\n") dmfconfig_tmp.flush() config = DMFConfig()
def test_dmfconfig_init_defaults2(dmfconfig_tmp): config = DMFConfig(defaults={"look": "here"}) assert config.c["look"] == "here"
def test_dmfconfig_init_defaults_emptyfile(dmfconfig_tmp): config = DMFConfig() assert config.c == DMFConfig.DEFAULTS
def test_dmfconfig_init_defaults_nofile(dmfconfig_none): config = DMFConfig() assert config.c == DMFConfig.DEFAULTS
def test_dmfconfig_init_defaults2(dmfconfig_tmp): config = DMFConfig(defaults={'look': 'here'}) assert config.c['look'] == 'here'