summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/plugins/command_plugin
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/functionalities/plugins/command_plugin
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/functionalities/plugins/command_plugin')
-rw-r--r--lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py37
1 files changed, 24 insertions, 13 deletions
diff --git a/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py b/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
index cde75dd1131e..46ebbef5c3ab 100644
--- a/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
+++ b/lldb/test/API/functionalities/plugins/command_plugin/TestPluginCommands.py
@@ -9,7 +9,6 @@ from lldbsuite.test import lldbutil
class PluginCommandTestCase(TestBase):
-
def setUp(self):
TestBase.setUp(self)
@@ -21,7 +20,7 @@ class PluginCommandTestCase(TestBase):
@no_debug_info_test
def test_load_plugin(self):
"""Test that plugins that load commands work correctly."""
- self.generateSource('plugin.cpp')
+ self.generateSource("plugin.cpp")
plugin_name = "plugin"
if sys.platform.startswith("darwin"):
@@ -35,37 +34,49 @@ class PluginCommandTestCase(TestBase):
retobj = lldb.SBCommandReturnObject()
retval = self.dbg.GetCommandInterpreter().HandleCommand(
- "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj)
+ "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj
+ )
retobj.Clear()
retval = self.dbg.GetCommandInterpreter().HandleCommand(
- "plugin_loaded_command child abc def ghi", retobj)
+ "plugin_loaded_command child abc def ghi", retobj
+ )
if self.TraceOn():
print(retobj.GetOutput())
- self.expect(retobj, substrs=['abc def ghi'], exe=False)
+ self.expect(retobj, substrs=["abc def ghi"], exe=False)
retobj.Clear()
# check that abbreviations work correctly in plugin commands.
retval = self.dbg.GetCommandInterpreter().HandleCommand(
- "plugin_loaded_ ch abc def ghi", retobj)
+ "plugin_loaded_ ch abc def ghi", retobj
+ )
if self.TraceOn():
print(retobj.GetOutput())
- self.expect(retobj, substrs=['abc def ghi'], exe=False)
+ self.expect(retobj, substrs=["abc def ghi"], exe=False)
@no_debug_info_test
def test_invalid_plugin_invocation(self):
- self.expect("plugin load a b",
- error=True, startstr="error: 'plugin load' requires one argument")
- self.expect("plugin load",
- error=True, startstr="error: 'plugin load' requires one argument")
+ self.expect(
+ "plugin load a b",
+ error=True,
+ startstr="error: 'plugin load' requires one argument",
+ )
+ self.expect(
+ "plugin load",
+ error=True,
+ startstr="error: 'plugin load' requires one argument",
+ )
@no_debug_info_test
def test_invalid_plugin_target(self):
- self.expect("plugin load ThisIsNotAValidPluginName",
- error=True, startstr="error: no such file")
+ self.expect(
+ "plugin load ThisIsNotAValidPluginName",
+ error=True,
+ startstr="error: no such file",
+ )