<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 4:10 PM Siva Chandra <<a href="mailto:sivachandra@google.com">sivachandra@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This change looks very innocent, but:<br>
<br>
On Mon, Dec 14, 2015 at 1:26 PM, Zachary Turner via lldb-commits<br>
<<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=255542&r1=255541&r2=255542&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=255542&r1=255541&r2=255542&view=diff</a><br>
> ==============================================================================<br>
> --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)<br>
> +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Mon Dec 14 15:26:49 2015<br>
> @@ -613,14 +613,16 @@ def expectedFailure(expected_fn, bugnumb<br>
>  # You can also pass not_in(list) to reverse the sense of the test for the arguments that<br>
>  # are simple lists, namely oslist, compiler, and debug_info.<br>
><br>
> -def not_in (iterable):<br>
> +def not_in(iterable):<br>
>      return lambda x : x not in iterable<br>
><br>
> -def check_list_or_lambda (list_or_lambda, value):<br>
> +def check_list_or_lambda(list_or_lambda, value):<br>
>      if six.callable(list_or_lambda):<br>
>          return list_or_lambda(value)<br>
> -    else:<br>
> +    elif isinstance(list_or_lambda, list):<br>
<br>
Previously, list_or_lambda could be a string. It cannot be now. That<br>
is, we should have:<br>
<br>
elif isinstance(list_or_lambda, list) or isinstance(list_or_lambda, str):<br></blockquote><div>Then won't that check `value in list_or_lambda` where `list_or_lambda` is a string, meaning it would only pass if `value` is a character?  That seems wrong.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
>          return list_or_lambda is None or value is None or value in list_or_lambda<br>
> +    else:<br>
> +        return list_or_lambda == value<br>
<br>
Previously, if value or list_or_lambda were None, this function<br>
returned True. It returns False now unless both are None. That is, it<br>
should be:<br>
<br>
else:<br>
    return list_or_lambda is None or value is None or list_or_lambda == value<br>
<br>
Will send a change list soon with the above fixed.<br></blockquote><div>That definitely seems like a good fix.</div></div></div>