Skip to content

Commit 83d7444

Browse files
author
Cruz Monrreal
authored
Merge pull request #6886 from cmonr/additional-py3-fixes
Corrected iteritems py2/3 compatability in test_api.py
2 parents 46c1e94 + 99dd4c2 commit 83d7444

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ fuzzywuzzy>=0.11
1414
pyelftools>=0.24
1515
jsonschema>=2.6
1616
future>=0.16.0
17+
six>=1.11.0

tools/test_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
Author: Przemyslaw Wirkus <[email protected]>
1818
"""
1919
from __future__ import print_function
20+
import six
2021

2122
import os
2223
import re
@@ -2126,12 +2127,12 @@ def predicate(base_pred, name_base_group_case):
21262127

21272128
# Apply common directories
21282129
for pred, path in commons:
2129-
for test_identity, test_paths in tests.iteritems():
2130+
for test_identity, test_paths in six.iteritems(tests):
21302131
if pred(test_identity):
21312132
test_paths.append(path)
21322133

21332134
# Drop identity besides name
2134-
return {name: paths for (name, _, _, _), paths in tests.iteritems()}
2135+
return {name: paths for (name, _, _, _), paths in six.iteritems(tests)}
21352136

21362137
def print_tests(tests, format="list", sort=True):
21372138
"""Given a dictionary of tests (as returned from "find_tests"), print them

0 commit comments

Comments
 (0)