[ZPT] CVS: Packages/TAL/tests - utils.py:1.4
Fred Drake Jr
fdrake@acm.org
Thu, 18 Oct 2001 12:16:09 -0400
Update of /cvs-repository/Packages/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv26365/tests
Modified Files:
utils.py
Log Message:
Set a "skipxml" flag if the XML parsers are not available.
This will be used by the modules that control the inclusion of XML tests.
=== Packages/TAL/tests/utils.py 1.3 => 1.4 ===
+# Set skipxml to true if an XML parser could not be found.
+skipxml = 0
+try:
+ import pyexpat
+except ImportError:
+ try:
+ # the C extension in PyXML
+ import xml.parsers.pyexpat
+ except ImportError:
+ skipxml = 1
+
+
def run_suite(suite, outf=None, errf=None):
if outf is None:
outf = sys.stdout