MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / target

Method target

test/test_bson.py:1195–1198  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

1193
1194 def test_bson_encode_thread_safe(self):
1195 def target(i):
1196 for j in range(1000):
1197 my_int = type(f"MyInt_{i}_{j}", (int,), {})
1198 bson.encode({"my_int": my_int()})
1199
1200 threads = [ExceptionCatchingTask(target=target, args=(i,)) for i in range(3)]
1201 for t in threads:

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected