MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / NsProviderApp

Class NsProviderApp

tests/test_commandset.py:1212–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1210
1211
1212class NsProviderApp(cmd2.Cmd):
1213 # Used to test namespace providers in CommandSets
1214 def __init__(self, *args, **kwargs) -> None:
1215 super().__init__(*args, **kwargs)
1216 super().__init__(*args, **kwargs)
1217
1218 @cmd2.with_argparser(cmd2.Cmd2ArgumentParser(), ns_provider=NsProviderSet.ns_provider)
1219 def do_test_ns(self, args: argparse.Namespace) -> None:
1220 # Save args.self so the unit tests can read it.
1221 self.last_result = args.self
1222
1223
1224def test_ns_provider() -> None:

Callers 1

test_ns_providerFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_ns_providerFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…