Merge pull request #6886 from cmonr/additional-py3-fixes

Corrected iteritems py2/3 compatability in test_api.py
pull/6917/head
Cruz Monrreal 2018-05-15 10:08:28 -05:00 committed by GitHub
commit 83d7444331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -14,3 +14,4 @@ fuzzywuzzy>=0.11
pyelftools>=0.24
jsonschema>=2.6
future>=0.16.0
six>=1.11.0

View File

@ -17,6 +17,7 @@ limitations under the License.
Author: Przemyslaw Wirkus <Przemyslaw.wirkus@arm.com>
"""
from __future__ import print_function
import six
import os
import re
@ -2126,12 +2127,12 @@ def find_tests(base_dir, target_name, toolchain_name, app_config=None):
# Apply common directories
for pred, path in commons:
for test_identity, test_paths in tests.iteritems():
for test_identity, test_paths in six.iteritems(tests):
if pred(test_identity):
test_paths.append(path)
# Drop identity besides name
return {name: paths for (name, _, _, _), paths in tests.iteritems()}
return {name: paths for (name, _, _, _), paths in six.iteritems(tests)}
def print_tests(tests, format="list", sort=True):
"""Given a dictionary of tests (as returned from "find_tests"), print them