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

Method test_clone

test/asynchronous/test_cursor.py:1603–1608  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1601 await anext(cursor)
1602
1603 async def test_clone(self):
1604 await self.db.test.insert_one({})
1605 cursor = self.db.test.find_raw_batches()
1606 # Copy of a RawBatchCursor is also a RawBatchCursor, not a Cursor.
1607 self.assertIsInstance(await anext(cursor.clone()), bytes)
1608 self.assertIsInstance(await anext(copy.copy(cursor)), bytes)
1609
1610 @async_client_context.require_no_mongos
1611 async def test_exhaust(self):

Callers

nothing calls this directly

Calls 5

anextFunction · 0.90
copyMethod · 0.80
insert_oneMethod · 0.45
find_raw_batchesMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected