summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-05-20 03:33:29 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-05-20 03:33:29 (GMT)
commitb20df9582778119a2ae3d031da8b597c19ad4fc9 (patch)
tree8a858701b0951207398bf8c3d30f3974a4e7b21a /Lib/test
parent77a1cf1622a06bf246189372219b7a17ad6abc08 (diff)
downloadcpython-b20df9582778119a2ae3d031da8b597c19ad4fc9.zip
cpython-b20df9582778119a2ae3d031da8b597c19ad4fc9.tar.gz
cpython-b20df9582778119a2ae3d031da8b597c19ad4fc9.tar.bz2
Issue #14849: setup Element data members to be assignable in subclasses
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xml_etree.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 2b05df8..df1f771 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1914,6 +1914,10 @@ class ElementTreeTest(unittest.TestCase):
self.assertIsInstance(mye, MyElement)
self.assertEqual(mye.tag, 'foo')
+ # test that attribute assignment works (issue 14849)
+ mye.text = "joe"
+ self.assertEqual(mye.text, "joe")
+
def test_Element_subclass_constructor(self):
class MyElement(ET.Element):
def __init__(self, tag, attrib={}, **extra):