(self)
| 292 | os.path.join(conf.userdir or '#', f'config-{cfg_type}.cfg')) |
| 293 | |
| 294 | def test_load_cfg_files(self): |
| 295 | conf = self.new_config(_utest=True) |
| 296 | |
| 297 | # Borrow test/configdata/cfgparser.1 from test_configparser. |
| 298 | config_path = findfile('cfgparser.1', subdir='configdata') |
| 299 | conf.defaultCfg['foo'] = config.IdleConfParser(config_path) |
| 300 | conf.userCfg['foo'] = config.IdleUserConfParser(config_path) |
| 301 | |
| 302 | # Load all config from path |
| 303 | conf.LoadCfgFiles() |
| 304 | |
| 305 | eq = self.assertEqual |
| 306 | |
| 307 | # Check defaultCfg is loaded |
| 308 | eq(conf.defaultCfg['foo'].Get('Foo Bar', 'foo'), 'newbar') |
| 309 | eq(conf.defaultCfg['foo'].GetOptionList('Foo Bar'), ['foo']) |
| 310 | |
| 311 | # Check userCfg is loaded |
| 312 | eq(conf.userCfg['foo'].Get('Foo Bar', 'foo'), 'newbar') |
| 313 | eq(conf.userCfg['foo'].GetOptionList('Foo Bar'), ['foo']) |
| 314 | |
| 315 | def test_save_user_cfg_files(self): |
| 316 | conf = self.mock_config() |
nothing calls this directly
no test coverage detected