[gobject-introspection] tests/annotationparser: Drop Python API usage down to 2.6, not 2.7
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] tests/annotationparser: Drop Python API usage down to 2.6, not 2.7
- Date: Sun, 30 Dec 2012 06:57:09 +0000 (UTC)
commit 651ba3d400e9efd75e1618066cd1b485cccac1a2
Author: Colin Walters <walters verbum org>
Date: Mon Dec 17 11:08:05 2012 -0500
tests/annotationparser: Drop Python API usage down to 2.6, not 2.7
.iterfind() is new in 2.7, but we claim 2.6 support, as I use on
RHEL6.
tests/scanner/annotationparser/test_parser.py | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/tests/scanner/annotationparser/test_parser.py b/tests/scanner/annotationparser/test_parser.py
index 86cd41a..a1c5866 100644
--- a/tests/scanner/annotationparser/test_parser.py
+++ b/tests/scanner/annotationparser/test_parser.py
@@ -145,12 +145,12 @@ def expected2tree(docblock):
annotations = docblock.find('identifier/annotations')
if annotations is not None:
expected += ' <annotations>\n'
- for annotation in annotations.iterfind('annotation'):
+ for annotation in annotations.findall('annotation'):
expected += ' <annotation>\n'
expected += ' <name>%s</name>\n' % (annotation.find('name').text, )
if annotation.find('options') is not None:
expected += ' <options>\n'
- for option in annotation.iterfind('options/option'):
+ for option in annotation.findall('options/option'):
expected += ' <option>\n'
expected += ' <name>%s</name>\n' % (option.find('name').text, )
if option.find('value') is not None:
@@ -164,18 +164,18 @@ def expected2tree(docblock):
parameters = docblock.find('parameters')
if parameters is not None:
expected += ' <parameters>\n'
- for parameter in parameters.iterfind('parameter'):
+ for parameter in parameters.findall('parameter'):
expected += ' <parameter>\n'
expected += ' <name>%s</name>\n' % (parameter.find('name').text, )
annotations = parameter.find('annotations')
if annotations is not None:
expected += ' <annotations>\n'
- for annotation in parameter.iterfind('annotations/annotation'):
+ for annotation in parameter.findall('annotations/annotation'):
expected += ' <annotation>\n'
expected += ' <name>%s</name>\n' % (annotation.find('name').text, )
if annotation.find('options') is not None:
expected += ' <options>\n'
- for option in annotation.iterfind('options/option'):
+ for option in annotation.findall('options/option'):
expected += ' <option>\n'
expected += ' <name>%s</name>\n' % (option.find('name').text, )
if option.find('value') is not None:
@@ -196,18 +196,18 @@ def expected2tree(docblock):
tags = docblock.find('tags')
if tags is not None:
expected += ' <tags>\n'
- for tag in tags.iterfind('tag'):
+ for tag in tags.findall('tag'):
expected += ' <tag>\n'
expected += ' <name>%s</name>\n' % (tag.find('name').text, )
annotations = tag.find('annotations')
if annotations is not None:
expected += ' <annotations>\n'
- for annotation in tag.iterfind('annotations/annotation'):
+ for annotation in tag.findall('annotations/annotation'):
expected += ' <annotation>\n'
expected += ' <name>%s</name>\n' % (annotation.find('name').text, )
if annotation.find('options') is not None:
expected += ' <options>\n'
- for option in annotation.iterfind('options/option'):
+ for option in annotation.findall('options/option'):
expected += ' <option>\n'
expected += ' <name>%s</name>\n' % (option.find('name').text, )
if option.find('value') is not None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]