MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / b

Function b

tests/python/test_pythonmonkey_eval.py:160–165  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

158 c = pm.eval("() => { throw TypeError('this is an exception'); }")
159
160 def b(x):
161 try:
162 x()
163 return ""
164 except Exception as e:
165 return "Caught in Py " + str(e)
166 ret = b(c)
167 assert ("Caught in Py Error in" in ret) and ("TypeError: this is an exception" in ret)
168

Calls

no outgoing calls

Tested by

no test coverage detected