Skip to content

Commit fee292b

Browse files
committed
Fix a number of doc test failures.
1 parent 1d2118e commit fee292b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

doc/examples/aggregation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ group method.
77

88
.. testsetup::
99

10-
>>> from pymongo import Connection
11-
>>> connection = Connection()
12-
>>> connection.drop_database('aggregation_example')
10+
from pymongo import Connection
11+
connection = Connection()
12+
connection.drop_database('aggregation_example')
1313

1414
Setup
1515
-----
@@ -59,7 +59,7 @@ eg "$sort":
5959
... {"$sort": SON([("count", -1), ("_id", -1)])}
6060
... ])
6161
...
62-
{u'ok': 1.0, u'result': [{u'count': 3, u'_id': u'cat'}, {u'count': 2, u'_id': u'dog'}, {u'count': 1, u'_id': u'mouse'}, {u'count': 1, u'_id': None}]}
62+
{u'ok': 1.0, u'result': [{u'count': 3, u'_id': u'cat'}, {u'count': 2, u'_id': u'dog'}, {u'count': 1, u'_id': u'mouse'}]}
6363

6464

6565
As well as simple aggregations the aggregation framework provides projection

doc/examples/geo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ It's also possible to query for all items within a given rectangle
6767
>>> for doc in db.places.find({"loc": {"$within": {"$box": [[2, 2], [5, 6]]}}}):
6868
... repr(doc)
6969
...
70-
"{u'loc': [2, 5], u'_id': ObjectId('...')}"
7170
"{u'loc': [4, 4], u'_id': ObjectId('...')}"
71+
"{u'loc': [2, 5], u'_id': ObjectId('...')}"
7272

7373
Or circle (specified by center point and radius):
7474

doc/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ of the collections in our database:
138138
.. doctest::
139139

140140
>>> db.collection_names()
141-
[u'posts', u'system.indexes']
141+
[u'system.indexes', u'posts']
142142

143143
.. note:: The *system.indexes* collection is a special internal
144144
collection that was created automatically.

pymongo/collection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def update(self, spec, document, upsert=False, manipulate=False,
381381
>>> list(db.test.find())
382382
[{u'a': u'b', u'x': u'y', u'_id': ObjectId('...')}]
383383
>>> db.test.update({"x": "y"}, {"$set": {"a": "c"}})
384+
{...}
384385
>>> list(db.test.find())
385386
[{u'a': u'c', u'x': u'y', u'_id': ObjectId('...')}]
386387

0 commit comments

Comments
 (0)