[Piglit] [PATCH v2 2/2] framework/summary/common.py: Add enabled, disabled, and skip to changes
Dylan Baker
baker.dylan.c at gmail.com
Thu Oct 22 12:49:56 PDT 2015
On Wed, Oct 21, 2015 at 07:48:27PM -0400, Ilia Mirkin wrote:
> On Wed, Oct 21, 2015 at 7:41 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > On Wed, Oct 21, 2015 at 04:01:03PM -0400, Ilia Mirkin wrote:
> >> On Wed, Oct 21, 2015 at 3:58 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> >> > On Wed, Oct 21, 2015 at 3:53 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> >> >> On Wed, Oct 21, 2015 at 02:52:38PM -0400, Ilia Mirkin wrote:
> >> >>> On Wed, Oct 21, 2015 at 2:24 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> >> >>> > On Wed, Oct 21, 2015 at 2:23 PM, <baker.dylan.c at gmail.com> wrote:
> >
> > [snip]
> >
> >> >>> >> + # Add any case of a != b except skip <-> notrun
> >> >>> >> + cur = _get(cur)
> >> >>> >> + prev = _get(prev)
> >> >>> >> + if cur != prev and {cur, prev} != {so.SKIP, so.NOTRUN}:
> >> >>> >
> >> >>> > Looks like a python3-ism?
> >> >>>
> >> >>> Or not. Looks like python2.7 added it -- fun. Looks right.
> >> >>>
> >> >>> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> >> >>>
> >> >>
> >> >> Yeah, I'm still not sure about how I feel about {} being both the dict
> >> >> and the set brackets. In this case though the terseness lets this fit on
> >> >> one line, and I like that a lot.
> >> >
> >> > If you wanted to be all fancy (aka even more difficult to read), you
> >> > could do something like
> >> >
> >> > if {cur, prev} - {so.SKIP, so.NOTRUN}:
> >> > asdf
> >> >
> >> > But normally I just do set([...]). I'll have to remember this {} thing.
> >>
> >> Er nevermind. This won't actually handle the cur == prev case :) Your
> >> code was fine.
> >
> > Neither does my code actually, I think the code is equivalent, though I
> > think you're missing a negation in your version.
> >
> > So ({a, b} == {a, b}) == !({a, b} - {a, b}), right?
>
> When would your code not work? It seems to be right for all the
> situations I could think of immediately...
I think it is correct, sorry if I confused you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151022/1cecbaf5/attachment.sig>
More information about the Piglit
mailing list