MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_threaded_reads

Method test_threaded_reads

test/test_gridfs_bucket.py:225–236  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

223 )
224
225 def test_threaded_reads(self):
226 self.fs.upload_from_stream("test", b"hello")
227
228 threads = []
229 results: list = []
230 for i in range(10):
231 threads.append(JustRead(self.fs, 10, results))
232 threads[i].start()
233
234 joinall(threads)
235
236 self.assertEqual(100 * [b"hello"], results)
237
238 def test_threaded_writes(self):
239 threads = []

Callers

nothing calls this directly

Calls 4

joinallFunction · 0.90
JustReadClass · 0.70
upload_from_streamMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected