diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-21 12:35:11 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-21 12:35:11 +0200 |
commit | 97e79d67f59a41ac88e8555f8186f0bffe829f8a (patch) | |
tree | c3dd11fc332d045cf49be6161656da4b739ffb96 /Lib/test | |
parent | 4b19d8dacb2bed474e8a193f51a09bdb122fff13 (diff) | |
parent | 81fa8b06a6a12aa2240ceb692760dc6cc15c2fc5 (diff) | |
download | cpython-97e79d67f59a41ac88e8555f8186f0bffe829f8a.tar.gz |
Merge from 3.5.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_xml_etree_c.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py index 87f3f27abc..7c60699f91 100644 --- a/Lib/test/test_xml_etree_c.py +++ b/Lib/test/test_xml_etree_c.py @@ -11,6 +11,7 @@ cET_alias = import_fresh_module('xml.etree.cElementTree', fresh=['_elementtree', 'xml.etree']) +@unittest.skipUnless(cET, 'requires _elementtree') class MiscTests(unittest.TestCase): # Issue #8651. @support.bigmemtest(size=support._2G + 100, memuse=1, dry_run=False) @@ -54,6 +55,15 @@ class MiscTests(unittest.TestCase): del element.attrib self.assertEqual(element.attrib, {'A': 'B', 'C': 'D'}) + def test_trashcan(self): + # If this test fails, it will most likely die via segfault. + e = root = cET.Element('root') + for i in range(200000): + e = cET.SubElement(e, 'x') + del e + del root + support.gc_collect() + @unittest.skipUnless(cET, 'requires _elementtree') class TestAliasWorking(unittest.TestCase): |