[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:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user