kastiglione added inline comments.

================
Comment at: lldb/packages/Python/lldbsuite/test/lldbtest.py:2440-2441
+            assert "patterns must be a collection of strings" and False
+        if isinstance(substrs, six.string_types):
+            assert "substrs must be a collection of strings" and False
+
----------------
teemperor wrote:
> labath wrote:
> > `assert isinstance(substrs, six.string_types), "substrs must be a 
> > collection of strings"` ?
> Or we could do `assertNotIsInstance` for a better error message that should 
> show the actual type.
It turns out that in practice `assertNotIsInstance` isn't a good match for this 
case because `six.string_types` is a tuple, and the formatted string becomes 
`"… is an instance of (<class 'str'>,)"`.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88792/new/

https://reviews.llvm.org/D88792

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to