summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-06-21 15:13:52 -0600
committerkotfu <kotfu@kotfu.net>2018-06-21 15:13:52 -0600
commit1cd46fd53c698f062995c2c45db57c07285a6f46 (patch)
tree4f306bf01c328ba32e14b5ff96d127384b111a91 /tests
parentc9ea3a749f7febb6dfe0f36001457e3907524ee7 (diff)
downloadcmd2-git-1cd46fd53c698f062995c2c45db57c07285a6f46.tar.gz
Revise precommand hooks to use `data` parameter
Diffstat (limited to 'tests')
-rw-r--r--tests/test_plugin.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index 98ad30ee..1f07f177 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -126,19 +126,19 @@ class Plugin:
"A precommand hook with too many parameters"
return one
- def precmd_hook_no_parameter_type(self, mydat) -> plugin.PrecommandData:
+ def precmd_hook_no_parameter_type(self, data) -> plugin.PrecommandData:
"A precommand hook with no type annotation on the parameter"
- return mydat
+ return data
- def precmd_hook_wrong_parameter_type(self, mydat: str) -> plugin.PrecommandData:
+ def precmd_hook_wrong_parameter_type(self, data: str) -> plugin.PrecommandData:
"A precommand hook with the incorrect type annotation on the parameter"
- return mydat
+ return data
- def precmd_hook_no_return_type(self, mydat: plugin.PrecommandData):
+ def precmd_hook_no_return_type(self, data: plugin.PrecommandData):
"A precommand hook with no type annotation on the return value"
- return mydat
+ return data
- def precmd_hook_wrong_return_type(self, mydat: plugin.PrecommandData) -> cmd2.Statement:
+ def precmd_hook_wrong_return_type(self, data: plugin.PrecommandData) -> cmd2.Statement:
return self.statement_parser.parse('hi there')