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

Function to_raise

tests/python/test_event_loop.py:79–80  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

77 f1 = loop.create_future()
78
79 def to_raise(msg):
80 f1.set_exception(TypeError(msg))
81 timeout_id0 = pm.eval("setTimeout")(to_raise, 100, "going to be there")
82 # `setTimeout` should return a `Timeout` instance wrapping a positive integer value
83 assert pm.eval("(t) => t instanceof setTimeout.Timeout")(timeout_id0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected