aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2019-10-14 00:54:37 +0100
committermarmeladema <xademax@gmail.com>2019-10-16 00:22:08 +0100
commit5bd0fca1405f1c7748d255dd0ba65ce7ba133c0a (patch)
tree93d905ace25a34889fccc58ebfc49e568ac104df /python/servo/testing_commands.py
parent6c813d073ca4099cf2207dae02a7a1594b8d2be1 (diff)
downloadservo-5bd0fca1405f1c7748d255dd0ba65ce7ba133c0a.tar.gz
servo-5bd0fca1405f1c7748d255dd0ba65ce7ba133c0a.zip
Use iteritems from six module for Python3 compatibility
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index a80b89cfb11..1f7651f814b 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -22,6 +22,7 @@ import six.moves.urllib as urllib
import base64
import shutil
import subprocess
+from six import iteritems
from mach.registrar import Registrar
from mach.decorators import (
@@ -59,7 +60,7 @@ TEST_SUITES = OrderedDict([
"include_arg": "test_name"}),
])
-TEST_SUITES_BY_PREFIX = {path: k for k, v in TEST_SUITES.iteritems() if "paths" in v for path in v["paths"]}
+TEST_SUITES_BY_PREFIX = {path: k for k, v in iteritems(TEST_SUITES) if "paths" in v for path in v["paths"]}
def create_parser_wpt():
@@ -158,7 +159,7 @@ class MachCommands(CommandBase):
return 1
test_start = time.time()
- for suite, tests in selected_suites.iteritems():
+ for suite, tests in iteritems(selected_suites):
props = suites[suite]
kwargs = props.get("kwargs", {})
if tests:
@@ -174,7 +175,7 @@ class MachCommands(CommandBase):
def suite_for_path(self, path_arg):
if os.path.exists(path.abspath(path_arg)):
abs_path = path.abspath(path_arg)
- for prefix, suite in TEST_SUITES_BY_PREFIX.iteritems():
+ for prefix, suite in iteritems(TEST_SUITES_BY_PREFIX):
if abs_path.startswith(prefix):
return suite
return None