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

Method test_closed

test/test_grid_file.py:384–398  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

382 f.close()
383
384 def test_closed(self):
385 f = GridIn(self.db.fs, chunkSize=5)
386 f.write(b"Hello world.\nHow are you?")
387 f.close()
388
389 g = GridOut(self.db.fs, f._id)
390 if not _IS_SYNC:
391 g.open()
392 self.assertFalse(g.closed)
393 g.read(1)
394 self.assertFalse(g.closed)
395 g.read(100)
396 self.assertFalse(g.closed)
397 g.close()
398 self.assertTrue(g.closed)
399
400 def test_multi_chunk_file(self):
401 random_string = b"a" * (DEFAULT_CHUNK_SIZE + 1000)

Callers

nothing calls this directly

Calls 7

writeMethod · 0.95
closeMethod · 0.95
openMethod · 0.95
readMethod · 0.95
closeMethod · 0.95
GridInClass · 0.90
GridOutClass · 0.90

Tested by

no test coverage detected