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

Class JustRead

test/test_gridfs.py:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63
64class JustRead(ConcurrentRunner):
65 def __init__(self, fs, n, results):
66 super().__init__()
67 self.fs = fs
68 self.n = n
69 self.results = results
70 self.daemon = True
71
72 def run(self):
73 for _ in range(self.n):
74 file = self.fs.get("test")
75 data = file.read()
76 self.results.append(data)
77 assert data == b"hello"
78
79
80class TestGridfsNoConnect(unittest.TestCase):

Callers 1

test_threaded_readsMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_threaded_readsMethod · 0.56