diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2023-05-25 08:48:57 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2023-05-25 12:54:09 -0700 |
| commit | 2238dcc39358353cac21df75c3c3286ab20b8f53 (patch) | |
| tree | 1bb7ec8d7405ccd7fdb5a8a78d0cf5ef40bcc963 /lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py | |
| parent | daeee56798c51e8f007e8e8e6e677a420b14c9ef (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/sbstructureddata/TestStructuredDataAPI.py')
| -rw-r--r-- | lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py b/lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py index 938cccc40fcb..38951a69be0d 100644 --- a/lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py +++ b/lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py @@ -3,7 +3,6 @@ Test some SBStructuredData API. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -11,6 +10,7 @@ from lldbsuite.test import lldbutil import json + class TestStructuredDataAPI(TestBase): NO_DEBUG_INFO_TESTCASE = True @@ -99,8 +99,7 @@ class TestStructuredDataAPI(TestBase): # Check Size API for 'dictionary' type if not dict_struct.GetSize() == 6: - self.fail("Wrong no of elements returned: " + - str(dict_struct.GetSize())) + self.fail("Wrong no of elements returned: " + str(dict_struct.GetSize())) def string_struct_test(self, dict_struct): string_struct = lldb.SBStructuredData() @@ -122,9 +121,8 @@ class TestStructuredDataAPI(TestBase): output = string_struct.GetIntegerValue() if output: self.fail( - "Valid integer value " + - str(output) + - " returned for a string object") + "Valid integer value " + str(output) + " returned for a string object" + ) def uint_struct_test(self, dict_struct): # Check a valid SBStructuredData containing an unsigned integer. @@ -141,7 +139,7 @@ class TestStructuredDataAPI(TestBase): # Check API returning unsigned integer value output = uint_struct.GetUnsignedIntegerValue() - if not output == 0xffffffff00000000: + if not output == 0xFFFFFFFF00000000: self.fail("wrong output: " + str(output)) # Calling wrong API on a SBStructuredData @@ -172,10 +170,7 @@ class TestStructuredDataAPI(TestBase): # (e.g. getting a string value from an integer type structure) output = sint_struct.GetStringValue(69) if output: - self.fail( - "Valid string " + - output + - " returned for an integer object") + self.fail("Valid string " + output + " returned for an integer object") def double_struct_test(self, dict_struct): floating_point_struct = lldb.SBStructuredData() @@ -185,8 +180,7 @@ class TestStructuredDataAPI(TestBase): # Check Type API if not floating_point_struct.GetType() == lldb.eStructuredDataTypeFloat: - self.fail("Wrong type returned: " + - str(floating_point_struct.GetType())) + self.fail("Wrong type returned: " + str(floating_point_struct.GetType())) # Check API returning 'double' value output = floating_point_struct.GetFloatValue() @@ -221,8 +215,7 @@ class TestStructuredDataAPI(TestBase): # Check Size API for 'array' type if not array_struct.GetSize() == 2: - self.fail("Wrong no of elements returned: " + - str(array_struct.GetSize())) + self.fail("Wrong no of elements returned: " + str(array_struct.GetSize())) # Check API returning a valid SBStructuredData for different 'array' # indices |
