Return a mocked idleConf Both default and user config used the same config-*.def
(self)
| 205 | return config.IdleConf(_utest=_utest) |
| 206 | |
| 207 | def mock_config(self): |
| 208 | """Return a mocked idleConf |
| 209 | |
| 210 | Both default and user config used the same config-*.def |
| 211 | """ |
| 212 | conf = config.IdleConf(_utest=True) |
| 213 | for ctype in conf.config_types: |
| 214 | conf.defaultCfg[ctype] = config.IdleConfParser('') |
| 215 | conf.defaultCfg[ctype].read_string(self.config_string[ctype]) |
| 216 | conf.userCfg[ctype] = config.IdleUserConfParser('') |
| 217 | conf.userCfg[ctype].read_string(self.config_string[ctype]) |
| 218 | |
| 219 | return conf |
| 220 | |
| 221 | @unittest.skipIf(sys.platform.startswith('win'), 'this is test for unix system') |
| 222 | def test_get_user_cfg_dir_unix(self): |
no test coverage detected