Beispiel #1
0
def test_Config_from_file_configobj(simple_config, tmp_text_file):
    tmp_text_file.write(SIMPLE_CONFIG_CONFIGOBJ_SERIALIZATION)
    tmp_text_file.flush()
    tmp_text_file.seek(0)
    config = Config.from_file(filename=tmp_text_file.name,
                              protocol="configobj")
    assert config == simple_config
Beispiel #2
0
def test_Config_from_file_zirkon(simple_config, tmp_text_file):
    tmp_text_file.write(SIMPLE_CONFIG_ZIRKON_SERIALIZATION)
    tmp_text_file.flush()
    tmp_text_file.seek(0)
    config = Config.from_file(filename=tmp_text_file.name, protocol="zirkon")
    assert config == simple_config