A helper for testing configure methods. Modifies the registered Options object with the given keyword arguments, then calls the configure method on the addon with the updated value.
(self, addon, **kwargs)
| 54 | return |
| 55 | |
| 56 | def configure(self, addon, **kwargs): |
| 57 | """ |
| 58 | A helper for testing configure methods. Modifies the registered |
| 59 | Options object with the given keyword arguments, then calls the |
| 60 | configure method on the addon with the updated value. |
| 61 | """ |
| 62 | if addon not in self.master.addons: |
| 63 | self.master.addons.register(addon) |
| 64 | with self.options.rollback(kwargs.keys(), reraise=True): |
| 65 | if kwargs: |
| 66 | self.options.update(**kwargs) |
| 67 | else: |
| 68 | self.master.addons.invoke_addon_sync(addon, hooks.ConfigureHook(set())) |
| 69 | |
| 70 | def script(self, path): |
| 71 | """ |