MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run

Function run

tests/harness/kg_closure_e2e.py:19–26  ·  view source on GitHub ↗
(*args, status=0, stdin=None, as_json=False)

Source from the content-addressed store, hash-verified

17 env = dict(os.environ, HOME=str(home), ATOMIC_NO_DAEMON="1")
18
19 def run(*args, status=0, stdin=None, as_json=False):
20 result = subprocess.run([binary, *args], cwd=root, env=env,
21 input=stdin, text=True, capture_output=True)
22 assert result.returncode == status, (
23 f"{args}: expected {status}, got {result.returncode}\n"
24 f"{result.stdout}\n{result.stderr}"
25 )
26 return json.loads(result.stdout) if as_json else result.stdout
27
28 run("init", "--view", "main")
29 identity = run("repo", "identity", "show", "--json", as_json=True)

Callers 1

checkFunction · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected