| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Trac
Revision: 7489
Author: ecarter
Date: 20 Aug 2008 23:52:16
Diff at Trac: http://trac.edgewall.org/changeset/7489
Changes:Trunk: Merge of r7486, a lxml version check, for thatch
Files:| ... | ...@@ -7,6 +7,7 @@ | |
| 7 | 7 | import os |
| 8 | 8 | from os.path import abspath, dirname, join |
| 9 | 9 | import sys |
| 10 | from pkg_resources import parse_version as pv | |
| 10 | 11 | try: |
| 11 | 12 | from cStringIO import StringIO |
| 12 | 13 | except ImportError: |
| ... | ...@@ -52,7 +53,15 @@ | |
| 52 | 53 | except ImportError: |
| 53 | 54 | print "SKIP: validation of XHTML output in functional tests " \ |
| 54 | 55 | "(no lxml installed)" |
| 55 | else: | |
| 56 | etree = None | |
| 57 | ||
| 58 | if etree and pv(etree.__version__) < pv('2.0.0'): | |
| 59 | # 2.0.7 and 2.1.x are known to work. | |
| 60 | print "SKIP: validation of XHTML output in functional tests " \ | |
| 61 | "(lxml < 2.0, api incompatibility)" | |
| 62 | etree = None | |
| 63 | ||
| 64 | if etree: | |
| 56 | 65 | class _Resolver(etree.Resolver): |
| 57 | 66 | base_dir = dirname(abspath(__file__)) |
| 58 | 67 |