MCPcopy
hub / github.com/joowani/binarytree / pprint_default

Function pprint_default

tests/utils.py:30–38  ·  view source on GitHub ↗

Helper function for testing Node.pprint with default arguments.

(values: NodeValueList)

Source from the content-addressed store, hash-verified

28
29
30def pprint_default(values: NodeValueList) -> List[str]:
31 """Helper function for testing Node.pprint with default arguments."""
32 root = build(values)
33 assert root is not None
34
35 with CaptureOutput() as output:
36 root.pprint(index=False, delimiter="-")
37 assert output[0] == "" and output[-1] == ""
38 return [line for line in output if line != ""]
39
40
41def pprint_with_index(values: NodeValueList) -> List[str]:

Callers

nothing calls this directly

Calls 3

buildFunction · 0.90
CaptureOutputClass · 0.85
pprintMethod · 0.80

Tested by

no test coverage detected