# HG changeset patch # User Yuya Nishihara # Date 1450878528 -32400 # Node ID f4517c88ab81354b31852dd1b914f6aeeb7f69bb # Parent 737ffdabbde9160af0a1182f75c7cfee0f71f7b7 test-install: embed wix namespace for Python 2.6 compatibility According to doc, the syntax is "{uri}tag". https://docs.python.org/2.7/library/xml.etree.elementtree.html#parsing-xml-with-namespaces diff -r 737ffdabbde9 -r f4517c88ab81 tests/test-install.t --- a/tests/test-install.t Wed Dec 23 17:54:13 2015 +0000 +++ b/tests/test-install.t Wed Dec 23 22:48:48 2015 +0900 @@ -53,13 +53,13 @@ > > def directory(node, relpath): > '''generator of files in the xml node, rooted at relpath''' - > dirs = node.findall('./wix:Directory', ns) + > dirs = node.findall('./{%(wix)s}Directory' % ns) > > for d in dirs: > for subfile in directory(d, relpath + d.attrib['Name'] + '/'): > yield subfile > - > files = node.findall('./wix:Component/wix:File', ns) + > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) > > for f in files: > yield relpath + f.attrib['Name'] @@ -83,7 +83,7 @@ > > xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1])) > root = xml.getroot() - > dir = root.find('.//wix:DirectoryRef', ns) + > dir = root.find('.//{%(wix)s}DirectoryRef' % ns) > > installed = [f for f in directory(dir, '')] >