summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-12-21 19:24:26 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-12-21 19:24:26 (GMT)
commit8ebe27f30012ad1858edf41a0ee0be16ff70127b (patch)
tree62a28157f0bf2500e03870168a60dce71d3217a5 /Doc
parentf259076790dac0b0c596a4545f05967d9cc76f65 (diff)
downloadcpython-8ebe27f30012ad1858edf41a0ee0be16ff70127b.zip
cpython-8ebe27f30012ad1858edf41a0ee0be16ff70127b.tar.gz
cpython-8ebe27f30012ad1858edf41a0ee0be16ff70127b.tar.bz2
Deprecate assertDictContainsSubset()
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 9d0d90a..9c0f1a1 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1078,9 +1078,6 @@ Test cases
| :meth:`assertNotRegex(s, re) | ``not regex.search(s)`` | 3.2 |
| <TestCase.assertNotRegex>` | | |
+---------------------------------------+--------------------------------+--------------+
- | :meth:`assertDictContainsSubset(a, b) | all the key/value pairs | 3.1 |
- | <TestCase.assertDictContainsSubset>` | in `a` exist in `b` | |
- +---------------------------------------+--------------------------------+--------------+
| :meth:`assertCountEqual(a, b) | `a` and `b` have the same | 3.2 |
| <TestCase.assertCountEqual>` | elements in the same number, | |
| | regardless of their order | |
@@ -1145,7 +1142,13 @@ Test cases
those in *subset*. If not, an error message listing the missing keys
and mismatched values is generated.
+ Note, the arguments are in the opposite order of what the method name
+ dictates. Instead, consider using the set-methods on :ref:`dictionary
+ views <dict-views>`, for example: ``d.keys() <= e.keys()`` or
+ ``d.items() <= d.items()``.
+
.. versionadded:: 3.1
+ .. deprecated:: 3.2
.. method:: assertCountEqual(actual, expected, msg=None)