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

Method test_threaded_reads

test/test_gridfs.py:223–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221 self.assertEqual({"mike", "test", "hello world"}, set(self.alt.list()))
222
223 def test_threaded_reads(self):
224 self.fs.put(b"hello", _id="test")
225
226 tasks = []
227 results: list = []
228 for i in range(10):
229 tasks.append(JustRead(self.fs, 10, results))
230 tasks[i].start()
231
232 joinall(tasks)
233
234 self.assertEqual(100 * [b"hello"], results)
235
236 def test_threaded_writes(self):
237 tasks = []

Callers

nothing calls this directly

Calls 4

joinallFunction · 0.90
JustReadClass · 0.70
putMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected