MCPcopy Create free account
hub / github.com/PyO3/pyo3 / arbitrary_python_code

Function arbitrary_python_code

pytests/tests/test_misc.py:109–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107 d = {"key": ArbitraryClass(worker_id, iteration)}
108
109 def arbitrary_python_code():
110 # remove the dictionary entry so that the class value can be
111 # garbage collected
112 del d["key"] # noqa: B023
113 print("gevent sleep", worker_id, iteration) # noqa: B023
114 gevent.sleep(0)
115 print("after gevent sleep", worker_id, iteration) # noqa: B023
116
117 print("start", worker_id, iteration)
118 pyo3_pytests.misc.get_item_and_run_callback(d, arbitrary_python_code)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected