(self)
| 236 | assert c["biz"].baz == "boz" |
| 237 | |
| 238 | def attr_access_has_useful_error_msg(self): |
| 239 | c = Config() |
| 240 | try: |
| 241 | c.nope |
| 242 | except AttributeError as e: |
| 243 | expected = """ |
| 244 | No attribute or config key found for 'nope' |
| 245 | |
| 246 | Valid keys: ['run', 'runners', 'sudo', 'tasks', 'timeouts'] |
| 247 | |
| 248 | Valid real attributes: ['clear', 'clone', 'env_prefix', 'file_prefix', 'from_data', 'global_defaults', 'load_base_conf_files', 'load_collection', 'load_defaults', 'load_overrides', 'load_project', 'load_runtime', 'load_shell_env', 'load_system', 'load_user', 'merge', 'pop', 'popitem', 'prefix', 'set_project_location', 'set_runtime_path', 'setdefault', 'update'] |
| 249 | """.strip() # noqa |
| 250 | assert str(e) == expected |
| 251 | else: |
| 252 | assert False, "Didn't get an AttributeError on bad key!" |
| 253 | |
| 254 | def subkeys_get_merged_not_overwritten(self): |
| 255 | # Ensures nested keys merge deeply instead of shallowly. |