Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: Well, I tried to write test like this.
1. Check if xml.parsers.expat.error is raised. 2. Compare *code* attribute of error object with xml.parsers.expat.errors.XML_ERROR_FINISHED But I noticed XML_ERROR_FINISHED is not integer but string. (!) According to http://docs.python.org/library/pyexpat.html#expaterror-objects > ExpatError.code > > Expat’s internal error number for the specific error. This will > match one of the constants defined in the errors object from > this module. Is this document bug or implementation bug? Personally, I think string 'parsing finished' as error constant might be useless... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6676> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com