mirror of https://github.com/ARMmbed/mbed-os.git
Corrected iteritems py2/3 compatability in test_api.py
parent
30e39eeb10
commit
daa0f9bc35
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
Author: Przemyslaw Wirkus <Przemyslaw.wirkus@arm.com>
|
Author: Przemyslaw Wirkus <Przemyslaw.wirkus@arm.com>
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
import six
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -2126,12 +2127,12 @@ def find_tests(base_dir, target_name, toolchain_name, app_config=None):
|
||||||
|
|
||||||
# Apply common directories
|
# Apply common directories
|
||||||
for pred, path in commons:
|
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):
|
if pred(test_identity):
|
||||||
test_paths.append(path)
|
test_paths.append(path)
|
||||||
|
|
||||||
# Drop identity besides name
|
# 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):
|
def print_tests(tests, format="list", sort=True):
|
||||||
"""Given a dictionary of tests (as returned from "find_tests"), print them
|
"""Given a dictionary of tests (as returned from "find_tests"), print them
|
||||||
|
|
Loading…
Reference in New Issue