MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_validate_table_data_valid

Function test_validate_table_data_valid

tests/test_argparse_completer.py:1251–1264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1249
1250
1251def test_validate_table_data_valid() -> None:
1252 action = argparse.Action(option_strings=["-f"], dest="foo")
1253 action.get_table_columns = lambda: ["Col1", "Col2"]
1254 arg_state = argparse_completer._ArgumentState(action)
1255
1256 completions = Completions(
1257 [
1258 CompletionItem("item1", table_data=["data1a", "data1b"]),
1259 CompletionItem("item2", table_data=["data2a", "data2b"]),
1260 ]
1261 )
1262
1263 # This should not raise an exception
1264 argparse_completer.ArgparseCompleter._validate_table_data(arg_state, completions)
1265
1266
1267# Custom ArgparseCompleter-based class

Callers

nothing calls this directly

Calls 3

CompletionsClass · 0.90
CompletionItemClass · 0.90
_validate_table_dataMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…