| 182 | |
| 183 | @classmethod |
| 184 | def setUpClass(cls): |
| 185 | cls.config_string = {} |
| 186 | |
| 187 | conf = config.IdleConf(_utest=True) |
| 188 | if __name__ != '__main__': |
| 189 | idle_dir = os.path.dirname(__file__) |
| 190 | else: |
| 191 | idle_dir = os.path.abspath(sys.path[0]) |
| 192 | for ctype in conf.config_types: |
| 193 | config_path = os.path.join(idle_dir, '../config-%s.def' % ctype) |
| 194 | with open(config_path) as f: |
| 195 | cls.config_string[ctype] = f.read() |
| 196 | |
| 197 | cls.orig_warn = config._warn |
| 198 | config._warn = Func() |
| 199 | |
| 200 | @classmethod |
| 201 | def tearDownClass(cls): |