diff options
author | Raymond Hettinger <python@rcn.com> | 2013-05-18 07:05:20 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-05-18 07:05:20 (GMT) |
commit | 163e9821b4644113e5aa4314e3c2e5b1b394e5f7 (patch) | |
tree | 877ab459b55549f50933947181f30598cc64edea /Lib/test | |
parent | 4e0172fd9acf7c5e8f30905fc997f904adbe562f (diff) | |
download | cpython-163e9821b4644113e5aa4314e3c2e5b1b394e5f7.zip cpython-163e9821b4644113e5aa4314e3c2e5b1b394e5f7.tar.gz cpython-163e9821b4644113e5aa4314e3c2e5b1b394e5f7.tar.bz2 |
Undo the deprecation of _asdict().
Backed out changeset c4ca39bece9d
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_collections.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 12bd952..8033031 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -217,11 +217,8 @@ class TestNamedTuple(unittest.TestCase): self.assertEqual(p, Point._make([11, 22])) # test _make classmethod self.assertEqual(p._fields, ('x', 'y')) # test _fields attribute self.assertEqual(p._replace(x=1), (1, 22)) # test _replace method - self.assertEqual(p.__dict__, - OrderedDict([('x', 11), ('y', 22)])) # test __dict__ attribute - self.assertEqual(vars(p), p.__dict__) # verify that vars() works - with self.assertWarns(DeprecationWarning): # check deprecate of _asdict - p._asdict() + self.assertEqual(p._asdict(), dict(x=11, y=22)) # test _asdict method + self.assertEqual(vars(p), p._asdict()) # verify that vars() works try: p._replace(x=1, error=2) |