diff options
author | Colin Walters <walters@verbum.org> | 2012-12-17 11:08:05 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-12-30 01:56:50 -0500 |
commit | 651ba3d400e9efd75e1618066cd1b485cccac1a2 (patch) | |
tree | 22ad2a12df4e41e6c73aa9eea7f4fe5c55df3917 /tests | |
parent | 2611eb1a69bfe4a098c60ab8efda32ec443c250c (diff) | |
download | gobject-introspection-651ba3d400e9efd75e1618066cd1b485cccac1a2.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | 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 86cd41a7..a1c5866c 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: |