On Mon, Mar 18, 2013 at 11:33 PM, Olemis Lang <[email protected]> wrote:
> On 3/18/13, Ryan Ollos <[email protected]> wrote: > > On Mon, Mar 18, 2013 at 1:36 PM, Apache Bloodhound < > > [email protected]> wrote: > > > >> #469: Some batch modify unit test cases are failing > >> > [...] > >> > >> Comment: > >> > >> [attachment:t469_r1457691_trac_test_batch_regression.diff Attached > >> patch] > >> should fix this . > >> > > > > Have you figured out already why the TicketSystem didn't need to be > enabled > > prior to the addition of ITicketFieldProvider? I'm just starting to look > at > > this, but it's not obvious to me so far. > > > > Oh yes ! > Just because in Trac test suite instantiates `TicketSystem` class this > way `TicketSystem(env)` rather than `env[TicketSystem]` . The former > will *always* return the instance whereas the later also checks > whether component class is enabled . Now , after introducing the > interface and considering that `TicketSystem` itself is an implementor > , then it will not be listed in the corresponding extension point and > thereby «built-in» ticket fields will not be contributed . > > In practice , in order to make `TicketSystem` work it must be enabled > ... so ... no defect in the SUT . Thanks! It took me a while to wrap my head around why the TicketSystem Component needed to be enabled in the test class, but your explanation helped a lot. I'll commit the patch now.
