You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
Reporting this issue for posterity, I realise this is unlikely to be fixed due to #100.
After pickling and unpickling a pyxb object that has an abstract element/substitutionGroup in a list element the object is no longer passes validateBinding and is unable to be converted to a DOM object or XML.
Adding the following to tests/trac/trac-0026/check-validation.py demonstrates the issue.
deftestPickle (self):
# After pickling should be able to invoke `validateBinding`, `toxml` or `toDOM` on `other`instance=trac26.CreateFromDocument(self.Good_xmlt)
self.assertEqual(2, len(instance.eAbstractCard))
self.assertTrue(isinstance(instance.eAbstractCard[0], trac26.tCardCymru))
self.assertTrue(isinstance(instance.eAbstractCard[1], trac26.tCardEnglish))
self.assertTrue(instance.validateBinding())
instance.toxml()
pickled=pickle.dumps(instance)
other=pickle.loads(pickled)
self.assertEqual(2, len(other.eAbstractCard))
self.assertTrue(isinstance(other.eAbstractCard[0], trac26.tCardCymru))
self.assertTrue(isinstance(other.eAbstractCard[1], trac26.tCardEnglish))
# the following all raise `AbstractElementError`self.assertTrue(other.validateBinding())
other.toxml()
other.toDOM()
Reporting this issue for posterity, I realise this is unlikely to be fixed due to #100.
After pickling and unpickling a pyxb object that has an abstract element/substitutionGroup in a list element the object is no longer passes
validateBinding
and is unable to be converted to a DOM object or XML.Adding the following to
tests/trac/trac-0026/check-validation.py
demonstrates the issue.The text was updated successfully, but these errors were encountered: