def test_read_config_file(tmpdir): with open(join(str(tmpdir), 'config.ini'), 'w') as cfgfile: cfgfile.write(CONFIG_TXT) cfgfile.flush() raw_config = _read_config_files([cfgfile.name]) assert raw_config == CONFIG_RAW