[Lldb-commits] [PATCH] D88792: [lldb/test] Catch invalid calls to expect()

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 5 02:39:20 PDT 2020


teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

Thanks for fixing all of this! Beside the assertion this LGTM.



================
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
+
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88792



More information about the lldb-commits mailing list