[TIP] Is it kosher to subclass plugins?
jpellerin at gmail.com
Sun Jun 22 05:49:18 PDT 2008
On Sat, Jun 21, 2008 at 4:32 PM, Fernando Perez <fperez.net at gmail.com> wrote:
> So the plugin seems to be working (the doctest in question *is* run
> correctly), but I'm wondering about that 'conflicting option' message.
> Am I misusing something? I can provide my entire code if it will
When you subclass a plugin, you have to be sure *not* to re-register
the superclass's commandline options. For example, you must override
options() and must not call super(...).options(...) from your
options(). You need to register only those options that are specific
to your subclass; if none are, then your options() method should be a
no-op. Likewise for configure() -- you don't want to call super()
Other things might go wrong, too -- this isn't a use case I planned
for, unfortunately. So once the options/configure issues are worked
out we may have some more pop up...
More information about the testing-in-python