[Lxml-checkins] r50162 - in lxml/trunk: . src/lxml/tests

scoder at codespeak.net scoder at codespeak.net
Fri Dec 28 18:50:35 CET 2007


Author: scoder
Date: Fri Dec 28 18:50:33 2007
New Revision: 50162

Modified:
   lxml/trunk/   (props changed)
   lxml/trunk/src/lxml/tests/common_imports.py
Log:
 r3191 at delle:  sbehnel | 2007-12-28 18:50:25 +0100
 skip (c)ET compatibility tests for older library versions


Modified: lxml/trunk/src/lxml/tests/common_imports.py
==============================================================================
--- lxml/trunk/src/lxml/tests/common_imports.py	(original)
+++ lxml/trunk/src/lxml/tests/common_imports.py	Fri Dec 28 18:50:33 2007
@@ -13,6 +13,11 @@
     except ImportError:
         ElementTree = None
 
+if hasattr(ElementTree, 'VERSION'):
+    if tuple(ElementTree.VERSION.split('.')) < (1,3):
+        # compatibility tests require ET 1.3+
+        ElementTree = None
+
 try:
     import cElementTree # standard ET
 except ImportError:
@@ -21,6 +26,11 @@
     except ImportError:
         cElementTree = None
 
+if hasattr(cElementTree, 'VERSION'):
+    if tuple(cElementTree.VERSION.split('.')) < (1,0,7):
+        # compatibility tests require cET 1.0.7+
+        cElementTree = None
+
 try:
     import doctest
     # check if the system version has everything we need


More information about the lxml-checkins mailing list