コード例 #1
0
ファイル: test_config.py プロジェクト: libAtoms/abcd
def test_create_config():
    config_file = ConfigFile('test')
    config_file.delete()
    assert config_file.exists() == False
    config_file.initialise({'test_section': {'test_option': 'test_value'}})
    assert config_file.exists() == True
    assert config_file.has_section('test_section')
    assert config_file.has_option('test_section', 'test_option')
    assert config_file.get('test_section', 'test_option') == 'test_value'
    config_file.delete()