diff options
author | Raymond Hettinger <python@rcn.com> | 2015-05-13 08:09:59 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-05-13 08:09:59 (GMT) |
commit | eac503aeac6fedc81001b9e1136957d45b9a2c51 (patch) | |
tree | 9b39bdd76843421487a78e56b2eb50c548e47d04 /Lib/test/test_descr.py | |
parent | f2244eaf9e3148d6270839e9aa7c2ad9752c17ed (diff) | |
download | cpython-eac503aeac6fedc81001b9e1136957d45b9a2c51.zip cpython-eac503aeac6fedc81001b9e1136957d45b9a2c51.tar.gz cpython-eac503aeac6fedc81001b9e1136957d45b9a2c51.tar.bz2 |
Issue #24064: Property() docstrings are now writeable.
(Patch by Berker Peksag.)
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 9f3d34d..80a526d 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2022,7 +2022,7 @@ order (MRO) for bases """ self.assertIs(raw.fset, C.__dict__['setx']) self.assertIs(raw.fdel, C.__dict__['delx']) - for attr in "__doc__", "fget", "fset", "fdel": + for attr in "fget", "fset", "fdel": try: setattr(raw, attr, 42) except AttributeError as msg: @@ -2033,6 +2033,9 @@ order (MRO) for bases """ self.fail("expected AttributeError from trying to set readonly %r " "attr on a property" % attr) + raw.__doc__ = 42 + self.assertEqual(raw.__doc__, 42) + class D(object): __getitem__ = property(lambda s: 1/0) |