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

Class JustRead

test/test_gridfs_bucket.py:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67class JustRead(ConcurrentRunner):
68 def __init__(self, gfs, num, results):
69 super().__init__()
70 self.gfs = gfs
71 self.num = num
72 self.results = results
73 self.daemon = True
74
75 def run(self):
76 for _ in range(self.num):
77 file = self.gfs.open_download_stream_by_name("test")
78 data = file.read()
79 self.results.append(data)
80 assert data == b"hello"
81
82
83class TestGridfs(IntegrationTest):

Callers 1

test_threaded_readsMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_threaded_readsMethod · 0.56