From 2238dcc39358353cac21df75c3c3286ab20b8f53 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 25 May 2023 08:48:57 -0700 Subject: [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 ` 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 --- .../cpp/gmodules/basic/TestWithModuleDebugging.py | 60 +++++++++------------- 1 file changed, 23 insertions(+), 37 deletions(-) (limited to 'lldb/test/API/lang/cpp/gmodules/basic/TestWithModuleDebugging.py') diff --git a/lldb/test/API/lang/cpp/gmodules/basic/TestWithModuleDebugging.py b/lldb/test/API/lang/cpp/gmodules/basic/TestWithModuleDebugging.py index d79a753f7248..c6b2e04cd9c1 100644 --- a/lldb/test/API/lang/cpp/gmodules/basic/TestWithModuleDebugging.py +++ b/lldb/test/API/lang/cpp/gmodules/basic/TestWithModuleDebugging.py @@ -6,7 +6,6 @@ from lldbsuite.test import lldbutil class TestWithGmodulesDebugInfo(TestBase): - @skipIf(bugnumber="llvm.org/pr36146", oslist=["linux"], archs=["i386"]) @add_test_categories(["gmodules"]) def test_specialized_typedef_from_pch(self): @@ -24,24 +23,22 @@ class TestWithGmodulesDebugInfo(TestBase): self.assertTrue(target.IsValid(), VALID_TARGET) # Break on interesting line - breakpoint = target.BreakpointCreateBySourceRegex( - "break here", src_file_spec) + breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec) self.assertTrue( - breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, - VALID_BREAKPOINT) + breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT + ) # Launch the process - process = target.LaunchSimple( - None, None, self.get_process_working_directory()) + process = target.LaunchSimple(None, None, self.get_process_working_directory()) self.assertTrue(process.IsValid(), PROCESS_IS_VALID) # Get the thread of the process self.assertState(process.GetState(), lldb.eStateStopped) - thread = lldbutil.get_stopped_thread( - process, lldb.eStopReasonBreakpoint) + thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue( thread.IsValid(), - "There should be a thread stopped due to breakpoint condition") + "There should be a thread stopped due to breakpoint condition", + ) # Get frame for current thread frame = thread.frames[0] @@ -49,44 +46,33 @@ class TestWithGmodulesDebugInfo(TestBase): testValue = frame.EvaluateExpression("test") self.assertTrue( testValue.GetError().Success(), - "Test expression value invalid: %s" % - (testValue.GetError().GetCString())) + "Test expression value invalid: %s" % (testValue.GetError().GetCString()), + ) self.assertEqual( - testValue.GetTypeName(), "IntContainer", - "Test expression type incorrect") + testValue.GetTypeName(), "IntContainer", "Test expression type incorrect" + ) memberValue = testValue.GetChildMemberWithName("storage") self.assertTrue( memberValue.GetError().Success(), - "Member value missing or invalid: %s" % - (testValue.GetError().GetCString())) - self.assertEqual( - memberValue.GetTypeName(), "int", - "Member type incorrect") - self.assertEqual( - 42, - memberValue.GetValueAsSigned(), - "Member value incorrect") + "Member value missing or invalid: %s" % (testValue.GetError().GetCString()), + ) + self.assertEqual(memberValue.GetTypeName(), "int", "Member type incorrect") + self.assertEqual(42, memberValue.GetValueAsSigned(), "Member value incorrect") testValue = frame.EvaluateExpression("bar") self.assertTrue( testValue.GetError().Success(), - "Test expression value invalid: %s" % - (testValue.GetError().GetCString())) + "Test expression value invalid: %s" % (testValue.GetError().GetCString()), + ) self.assertEqual( - testValue.GetTypeName(), "Foo::Bar", - "Test expression type incorrect") + testValue.GetTypeName(), "Foo::Bar", "Test expression type incorrect" + ) memberValue = testValue.GetChildMemberWithName("i") self.assertTrue( memberValue.GetError().Success(), - "Member value missing or invalid: %s" % - (testValue.GetError().GetCString())) - self.assertEqual( - memberValue.GetTypeName(), "int", - "Member type incorrect") - self.assertEqual( - 123, - memberValue.GetValueAsSigned(), - "Member value incorrect") - + "Member value missing or invalid: %s" % (testValue.GetError().GetCString()), + ) + self.assertEqual(memberValue.GetTypeName(), "int", "Member type incorrect") + self.assertEqual(123, memberValue.GetValueAsSigned(), "Member value incorrect") -- cgit v1.2.3