2 Test the PExpectTest test functions.
5 from lldbsuite
.test
.lldbpexpect
import *
8 class TestPExpectTestCase(PExpectTest
):
9 NO_DEBUG_INFO_TESTCASE
= True
11 def assert_expect_fails_with(self
, cmd
, expect_args
, expected_msg
):
13 self
.expect(cmd
, **expect_args
)
14 except AssertionError as e
:
15 self
.assertIn(expected_msg
, str(e
))
17 self
.fail("expect should have raised AssertionError!")
19 def test_expect(self
):
20 # Test that passing a string to the 'substrs' argument is rejected.
21 self
.assert_expect_fails_with(
22 "settings list prompt",
23 dict(substrs
="some substring"),
24 "substrs must be a collection of strings",