True, but there's two sides of this.

When needing the explicit annotation, it will keep out stuff that shouldn't be 
included (I agree on the wfRunHooks example).

However, depending on how it's implemented, it might also remove the very 
essence of line coverage. We wouldn't want to disable automatic coverage 
entirely (e.g. @cover Foo to mark Foo as 100% covered). It's still useful to 
have it provide the line-by-line coverage of an individual method to see what 
hasn't been covered yet.

Anyway, it looks like it's implemented with this in mind. It's not a boolean 
flag to disable the covering detection. It's more like a filter to to keep 
everything else out. Great :)

-- Krinkle

On 2013-10-18, at 18:38, Erik Bernhardson <ebernhard...@wikimedia.org> wrote:

> different definitions of test ;-)  code touched seems like a much less
> useful metric than code specifically tested, but i could be convinced
> otherwise.
> 
> 
> On Fri, Oct 18, 2013 at 9:31 AM, Brad Jorsch (Anomie) <bjor...@wikimedia.org
>> wrote:
> 
>> On Fri, Oct 18, 2013 at 12:13 PM, Erik Bernhardson
>> <ebernhard...@wikimedia.org> wrote:
>>> On Fri, Oct 18, 2013 at 8:23 AM, Brad Jorsch (Anomie) <
>> bjor...@wikimedia.org
>>>> wrote:
>>> 
>>>> On Fri, Oct 18, 2013 at 5:52 AM, Antoine Musso <hashar+...@free.fr>
>> wrote:
>>>> 
>>>> 
>>>> In June I enforced a PHPUnit feature which force us to mention which
>>>>> MediaWiki function is covered by a test method [FORCE COVER].
>>>> 
>>>> Why is this desirable?
>>>> 
>>>> 
>>> In my experience this is desirable in order to only mark the particular
>>> code you are testing as covered.  So for example if you are testing
>>> database functions, you don't want it to mark wfRunHooks and friends as
>>> "covered" when it just happened to be called but wasn't specifically
>> tested.
>> 
>> On the other hand, you *did* test part of wfRunHooks, even if indirectly.
>> 
>> 
>> --
>> Brad Jorsch (Anomie)
>> Software Engineer
>> Wikimedia Foundation
>> 
>> _______________________________________________
>> Wikitech-l mailing list
>> Wikitech-l@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>> 
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to