(self)
| 1626 | try_invalid_session() |
| 1627 | |
| 1628 | def test_large_limit(self): |
| 1629 | db = self.db |
| 1630 | db.drop_collection("test_large_limit") |
| 1631 | db.test_large_limit.create_index([("x", 1)]) |
| 1632 | my_str = "mongomongo" * 1000 |
| 1633 | |
| 1634 | db.test_large_limit.insert_many({"x": i, "y": my_str} for i in range(2000)) |
| 1635 | |
| 1636 | i = 0 |
| 1637 | y = 0 |
| 1638 | for doc in db.test_large_limit.find(limit=1900).sort([("x", 1)]): |
| 1639 | i += 1 |
| 1640 | y += doc["x"] |
| 1641 | |
| 1642 | self.assertEqual(1900, i) |
| 1643 | self.assertEqual((1900 * 1899) / 2, y) |
| 1644 | |
| 1645 | def test_find_kwargs(self): |
| 1646 | db = self.db |
nothing calls this directly
no test coverage detected