def test_is_enabled(self): try: import lxml lxml except ImportError: self.assertFalse(_lxml.is_enabled()) else: self.assertTrue(_lxml.is_enabled())
def test_is_enabled(self): from hwp5.plat import _lxml try: import lxml; lxml except ImportError: self.assertFalse(_lxml.is_enabled()) else: self.assertTrue(_lxml.is_enabled())
def get_xslt(): if javax_transform.is_enabled(): return javax_transform.xslt if _lxml.is_enabled(): return _lxml.xslt if xsltproc.is_enabled(): return xsltproc.xslt if _uno.is_enabled(): return _uno.xslt
def setUp(self): if _lxml.is_enabled(): self.xslt = _lxml.xslt self.xslt_compile = _lxml.xslt_compile self.relaxng = _lxml.relaxng self.relaxng_compile = _lxml.relaxng_compile else: self.xslt = None self.xslt_compile = None self.relaxng = None self.relaxng_compile = None
def setUp(self): from hwp5.plat import _lxml if _lxml.is_enabled(): self.xslt = _lxml.xslt self.xslt_compile = _lxml.xslt_compile self.relaxng = _lxml.relaxng self.relaxng_compile = _lxml.relaxng_compile else: self.xslt = None self.xslt_compile = None self.relaxng = None self.relaxng_compile = None
def get_relaxng(): if _lxml.is_enabled(): return _lxml.relaxng if xmllint.is_enabled(): return xmllint.relaxng