Skip to content

Commit daa0f9b

Browse files
committed
Corrected iteritems py2/3 compatability in test_api.py
1 parent 30e39ee commit daa0f9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)