% hg diff -p diff -r 5ef49659935f Lib/test/test_xml_etree.py --- a/Lib/test/test_xml_etree.py Fri Dec 28 19:09:41 2012 +0100 +++ b/Lib/test/test_xml_etree.py Sat Dec 29 16:05:26 2012 +0000 @@ -16,6 +16,7 @@ import html import io +import pickle import sys import unittest import weakref @@ -1768,6 +1769,9 @@ class BasicElementTest(unittest.TestCase self.assertEqual(flag, True) self.assertEqual(wref(), None) + def test_pickling(self): + # issue #16076: the C implementation wasn't pickleable. + (pickle.dumps(ET.Element('foo'))) class ElementTreeTest(unittest.TestCase): def test_istype(self): % ./python -mtest -f =(echo test_{__all__,xml_etree}) ; ./python -mtest test_xml_etree [1/2] test___all__ [2/2] test_xml_etree test test_xml_etree failed -- Traceback (most recent call last): File "/home/danielsh/src/py/t1/Lib/test/test_xml_etree.py", line 1774, in test_pickling (pickle.dumps(ET.Element('foo'))) _pickle.PicklingError: Can't pickle : it's not the same object as xml.etree.ElementTree.Element 1 test OK. 1 test failed: test_xml_etree zsh: exit 1 ./python -mtest -f =(echo test_{__all__,xml_etree}) [1/1] test_xml_etree 1 test OK. %