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

Method to_list

test/test_collection.py:1761–1762  ·  view source on GitHub ↗
(things)

Source from the content-addressed store, hash-verified

1759 self.assertEqual(3, (db.test.find_one(sort=[("x", -1)]))["x"])
1760
1761 def to_list(things):
1762 return [thing["x"] for thing in things]
1763
1764 self.assertEqual([2, 1, 3], to_list(db.test.find()))
1765 self.assertEqual([1, 2, 3], to_list(db.test.find(sort=[("x", 1)])))

Callers 9

test_list_indexesMethod · 0.45
test_index_textMethod · 0.45
test_find_w_regexMethod · 0.45
test_aggregateMethod · 0.45
test_cursor_timeoutMethod · 0.45
test_min_queryMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected