[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`.
This commit is contained in:
Jordan Rupprecht
2024-02-21 13:02:30 -06:00
committed by GitHub
parent 4247175d45
commit 9c2468821e
99 changed files with 335 additions and 299 deletions

View File

@@ -201,9 +201,7 @@ class ScriptedProcesTestCase(TestBase):
py_impl = process_0.GetScriptedImplementation()
self.assertTrue(py_impl)
self.assertTrue(
isinstance(py_impl, dummy_scripted_process.DummyScriptedProcess)
)
self.assertIsInstance(py_impl, dummy_scripted_process.DummyScriptedProcess)
self.assertFalse(hasattr(py_impl, "my_super_secret_member"))
py_impl.my_super_secret_member = 42
self.assertTrue(hasattr(py_impl, "my_super_secret_member"))