diff options
| author | Jordan Rupprecht <rupprecht@google.com> | 2024-02-21 13:02:30 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 13:02:30 -0600 |
| commit | 9c2468821ec51defd09c246fea4a47886fff8c01 (patch) | |
| tree | 37781dd1ecd1e72faad5215f06e5a1579106b451 /lldb/test/API/python_api/process/TestProcessAPI.py | |
| parent | 4247175d4536964322b129d1d3bbe6128da653bf (diff) | |
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).
For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.
Diffstat (limited to 'lldb/test/API/python_api/process/TestProcessAPI.py')
| -rw-r--r-- | lldb/test/API/python_api/process/TestProcessAPI.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/test/API/python_api/process/TestProcessAPI.py b/lldb/test/API/python_api/process/TestProcessAPI.py index 65330e5163f7..0b857fb033f1 100644 --- a/lldb/test/API/python_api/process/TestProcessAPI.py +++ b/lldb/test/API/python_api/process/TestProcessAPI.py @@ -324,7 +324,7 @@ class ProcessAPITestCase(TestBase): if self.TraceOn(): print("process state:", state_type_to_str(process.GetState())) - self.assertTrue(process.GetState() != lldb.eStateConnected) + self.assertNotEqual(process.GetState(), lldb.eStateConnected) error = lldb.SBError() success = process.RemoteLaunch( |
