MCPcopy Create free account
hub / github.com/ElementsProject/lightning / reckless

Function reckless

tests/test_reckless.py:130–154  ·  view source on GitHub ↗

Call the reckless executable, optionally with a directory.

(cmds: list, dir: PosixPath = None,
             autoconfirm=True, timeout: int = 60)

Source from the content-addressed store, hash-verified

128
129
130def reckless(cmds: list, dir: PosixPath = None,
131 autoconfirm=True, timeout: int = 60):
132 '''Call the reckless executable, optionally with a directory.'''
133 if dir is not None:
134 cmds.insert(0, "-l")
135 cmds.insert(1, str(dir))
136 cmds.insert(0, "tools/reckless")
137 if autoconfirm:
138 process_input = 'Y\n'
139 else:
140 process_input = None
141 r = subprocess.run(cmds, capture_output=True, encoding='utf-8', env=my_env,
142 input=process_input, timeout=timeout)
143 stdout = r.stdout.splitlines()
144 stderr = r.stderr.splitlines()
145 print(" ".join(r.args), "\n")
146 print("***RECKLESS STDOUT***")
147 for l in stdout:
148 print(l)
149 print('\n')
150 print("***RECKLESS STDERR***")
151 for l in stderr:
152 print(l)
153 print('\n')
154 return RecklessResult(r, r.returncode, stdout, stderr)
155
156
157def get_reckless_node(node_factory):

Callers 11

test_basic_helpFunction · 0.70
test_contextual_helpFunction · 0.70
test_sourcesFunction · 0.70
test_searchFunction · 0.70
test_installFunction · 0.70
test_poetry_installFunction · 0.70
test_local_dir_installFunction · 0.70
test_disable_enableFunction · 0.70
test_tag_installFunction · 0.70
test_reckless_uv_installFunction · 0.70

Calls 4

RecklessResultClass · 0.85
joinMethod · 0.80
insertMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected