Skip to content

Commit

Permalink
Merge pull request #6886 from cmonr/additional-py3-fixes
Browse files Browse the repository at this point in the history
Corrected iteritems py2/3 compatability in test_api.py
  • Loading branch information
Cruz Monrreal committed May 15, 2018
2 parents 46c1e94 + 99dd4c2 commit 83d7444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ fuzzywuzzy>=0.11
pyelftools>=0.24
jsonschema>=2.6
future>=0.16.0
six>=1.11.0
5 changes: 3 additions & 2 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Author: Przemyslaw Wirkus <Przemyslaw.wirkus@arm.com>
"""
from __future__ import print_function
import six

import os
import re
Expand Down Expand Up @@ -2126,12 +2127,12 @@ def predicate(base_pred, name_base_group_case):

# 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
Expand Down

0 comments on commit 83d7444

Please sign in to comment.