summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2023-05-25 08:48:57 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2023-05-25 12:54:09 -0700
commit2238dcc39358353cac21df75c3c3286ab20b8f53 (patch)
tree1bb7ec8d7405ccd7fdb5a8a78d0cf5ef40bcc963 /lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py
parentdaeee56798c51e8f007e8e8e6e677a420b14c9ef (diff)
[NFC][Py Reformat] Reformat python files in lldb
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
Diffstat (limited to 'lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py')
-rw-r--r--lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py b/lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py
index 45ef14c1df9f..a12955adb7ce 100644
--- a/lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py
+++ b/lldb/test/API/python_api/compile_unit/TestCompileUnitAPI.py
@@ -9,20 +9,21 @@ from lldbsuite.test import lldbutil
class CompileUnitAPITestCase(TestBase):
-
def test(self):
"""Exercise some SBCompileUnit APIs."""
self.build()
- (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, 'break here', lldb.SBFileSpec('main.c'))
+ (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+ self, "break here", lldb.SBFileSpec("main.c")
+ )
self.assertTrue(target, VALID_TARGET)
self.assertTrue(process, PROCESS_IS_VALID)
- self.assertTrue(bkpt and bkpt.GetNumLocations() == 1,
- VALID_BREAKPOINT)
+ self.assertTrue(bkpt and bkpt.GetNumLocations() == 1, VALID_BREAKPOINT)
self.assertTrue(
thread.IsValid(),
- "There should be a thread stopped due to breakpoint condition")
+ "There should be a thread stopped due to breakpoint condition",
+ )
frame0 = thread.GetFrameAtIndex(0)
line_entry = frame0.GetLineEntry()
@@ -32,8 +33,9 @@ class CompileUnitAPITestCase(TestBase):
main_cu = sc_list.compile_units[0]
self.assertTrue(main_cu.IsValid(), "Main executable CU is not valid")
- self.assertEqual(main_cu.FindLineEntryIndex(line_entry, True),
- main_cu.FindLineEntryIndex(0, line_entry.GetLine(),
- line_entry.GetFileSpec(), True))
-
-
+ self.assertEqual(
+ main_cu.FindLineEntryIndex(line_entry, True),
+ main_cu.FindLineEntryIndex(
+ 0, line_entry.GetLine(), line_entry.GetFileSpec(), True
+ ),
+ )