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

Method test_min_max_without_hint

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

Source from the content-addressed store, hash-verified

578 db.test.find().min({"j": 10}) # type: ignore[arg-type]
579
580 def test_min_max_without_hint(self):
581 coll = self.db.test
582 j_index = [("j", ASCENDING)]
583 coll.create_index(j_index)
584
585 with self.assertRaises(InvalidOperation):
586 coll.find().min([("j", 3)]).to_list()
587 with self.assertRaises(InvalidOperation):
588 coll.find().max([("j", 3)]).to_list()
589
590 def test_batch_size(self):
591 db = self.db

Callers

nothing calls this directly

Calls 5

create_indexMethod · 0.45
to_listMethod · 0.45
minMethod · 0.45
findMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected