[Zope3-checkins] CVS: Zope3/lib/python/Zope/TAL/tests - utils.py:1.7

Fred L. Drake, Jr. fdrake@acm.org
Mon, 28 Oct 2002 10:55:08 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv24041

Modified Files:
	utils.py 
Log Message:
Simplify the test for pyexpat; this should always work with Python
2.2.2 and newer, and PyXML 0.7.1 and newer.  This sticks to the
recommended way to import Expat.


=== Zope3/lib/python/Zope/TAL/tests/utils.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/TAL/tests/utils.py:1.6	Mon Jun 10 19:29:44 2002
+++ Zope3/lib/python/Zope/TAL/tests/utils.py	Mon Oct 28 10:55:08 2002
@@ -28,13 +28,9 @@
 # Set skipxml to true if an XML parser could not be found.
 skipxml = 0
 try:
-    import pyexpat
+    import xml.parsers.expat
 except ImportError:
-    try:
-        # the C extension in PyXML
-        import xml.parsers.pyexpat
-    except ImportError:
-        skipxml = 1
+    skipxml = 1
 
 
 def run_suite(suite, outf=None, errf=None):