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

Method test_aggregate

test/test_session.py:648–661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

646 f.read()
647
648 def test_aggregate(self):
649 client = self.client
650 coll = client.pymongo_test.collection
651
652 def agg(session=None):
653 (coll.aggregate([], batchSize=2, session=session)).to_list()
654
655 # With empty collection.
656 self._test_ops(client, (agg, [], {}))
657
658 # Now with documents.
659 coll.insert_many([{} for _ in range(10)])
660 self.addCleanup(coll.drop)
661 self._test_ops(client, (agg, [], {}))
662
663 def test_killcursors(self):
664 client = self.client

Callers

nothing calls this directly

Calls 3

_test_opsMethod · 0.95
addCleanupMethod · 0.80
insert_manyMethod · 0.45

Tested by

no test coverage detected