[Lldb-commits] [PATCH] D96556: [lldb] Let TestPExpectTest test the right test class
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 12 00:57:05 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c118831a37a: [lldb] Let TestPExpectTest test the right test class (authored by teemperor).
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96556/new/
https://reviews.llvm.org/D96556
Files:
lldb/packages/Python/lldbsuite/test/lldbpexpect.py
lldb/test/API/test_utils/TestPExpectTest.py
Index: lldb/test/API/test_utils/TestPExpectTest.py
===================================================================
--- lldb/test/API/test_utils/TestPExpectTest.py
+++ lldb/test/API/test_utils/TestPExpectTest.py
@@ -2,14 +2,9 @@
Test the PExpectTest test functions.
"""
+from lldbsuite.test.lldbpexpect import *
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-from textwrap import dedent
-
-
-class TestPExpectTestCase(TestBase):
+class TestPExpectTestCase(PExpectTest):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
Index: lldb/packages/Python/lldbsuite/test/lldbpexpect.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -53,11 +53,12 @@
def expect(self, cmd, substrs=None):
self.assertNotIn('\n', cmd)
- self.child.sendline(cmd)
# If 'substrs' is a string then this code would just check that every
# character of the string is in the output.
assert not isinstance(substrs, six.string_types), \
"substrs must be a collection of strings"
+
+ self.child.sendline(cmd)
if substrs is not None:
for s in substrs:
self.child.expect_exact(s)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96556.323238.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210212/017178e8/attachment.bin>
More information about the lldb-commits
mailing list