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

Method test_clone_empty

test/test_cursor.py:1000–1006  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

998
999 @client_context.require_sync
1000 def test_clone_empty(self):
1001 self.db.test.delete_many({})
1002 self.db.test.insert_many([{"x": i} for i in range(1, 4)])
1003 cursor = self.db.test.find()[2:2]
1004 cursor2 = cursor.clone()
1005 self.assertRaises(StopIteration, cursor.next)
1006 self.assertRaises(StopIteration, cursor2.next)
1007
1008 # Cursors don't support slicing
1009 @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