diff options
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r-- | Lib/test/test_collections.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index e2ffaaa..c081594 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -514,6 +514,14 @@ class TestNamedTuple(unittest.TestCase): a.w = 5 self.assertEqual(a.__dict__, {'w': 5}) + def test_namedtuple_can_mutate_doc_of_descriptors_independently(self): + A = namedtuple('A', 'x y') + B = namedtuple('B', 'x y') + A.x.__doc__ = 'foo' + B.x.__doc__ = 'bar' + self.assertEqual(A.x.__doc__, 'foo') + self.assertEqual(B.x.__doc__, 'bar') + ################################################################################ ### Abstract Base Classes |