prjemian / punx

Python Utilities for NeXus HDF5 files
https://prjemian.github.io/punx
5 stars 7 forks source link

validate: build test for ``lxml.etree.DocumentInvalid`` #63

Closed prjemian closed 7 years ago

prjemian commented 7 years ago

In punx.validate.validate_xml(), there is a clause that reads:

except lxml.etree.DocumentInvalid as exc:
    msg = 'DocumentInvalid:\n'
    msg += 'file: ' + xml_file_name + '\n'
    msg += str(exc)
    raise Exception(msg)

build a test case for this code