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

Method test_clone_empty

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

Source from the content-addressed store, hash-verified

1007
1008 @async_client_context.require_sync
1009 def test_clone_empty(self):
1010 self.db.test.delete_many({})
1011 self.db.test.insert_many([{"x": i} for i in range(1, 4)])
1012 cursor = self.db.test.find()[2:2]
1013 cursor2 = cursor.clone()
1014 self.assertRaises(StopIteration, cursor.next)
1015 self.assertRaises(StopIteration, cursor2.next)
1016
1017 # AsyncCursors don't support slicing
1018 @async_client_context.require_sync

Callers

nothing calls this directly

Calls 4

delete_manyMethod · 0.45
insert_manyMethod · 0.45
findMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected