Skip to content

Commit 554904d

Browse files
committed
Address review feedback
1 parent 6d7817b commit 554904d

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

doc/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ PyMongo 4.17 brings a number of changes including:
88

99
- ``has_key``, ``iterkeys`` and ``itervalues`` in :class:`bson.son.SON` have
1010
been deprecated and will be removed in PyMongo 5.0. These methods were
11-
deprecated in favor of the standard dictionary methods ``in``, ``keys``, and
12-
``values`` respectively.
11+
deprecated in favor of the standard dictionary containment operator ``in``
12+
and the ``keys()`` and ``values()`` methods, respectively.
1313

1414
- Added the :meth:`~pymongo.asynchronous.client_session.AsyncClientSession.bind` and :meth:`~pymongo.client_session.ClientSession.bind` methods
1515
that allow users to bind a session to all database operations within the scope of a context manager instead of having to explicitly pass the session to each individual operation.

test/test_son.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,11 @@ def test_iteration(self):
145145
self.assertEqual(ele * 100, test_son[ele])
146146

147147
def test_contains_has(self):
148-
"""key in SON and __contains__"""
148+
"""Test key membership via 'in' and __contains__."""
149149
test_son = SON([(1, 100), (2, 200), (3, 300)])
150150
self.assertIn(1, test_son)
151151
self.assertIn(2, test_son, "in failed")
152152
self.assertNotIn(22, test_son, "in succeeded when it shouldn't")
153-
self.assertTrue(2 in test_son, "'in' operator failed for key 2")
154-
self.assertFalse(22 in test_son, "'in' operator succeeded when it shouldn't")
155153

156154
def test_clears(self):
157155
"""Test clear()"""

0 commit comments

Comments
 (0)