diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-05-29 13:56:03 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-05-29 13:56:03 +0200 |
commit | faa8c0e967cd9e3526c05e4eac34c679cb14ed5f (patch) | |
tree | 79fb6d27505cf33d185a1a95de93b28b764ee44d /python/servo/testing_commands.py | |
parent | 9a93c218675374eb4d57fa2d55f1bdadb831ac8d (diff) | |
download | servo-faa8c0e967cd9e3526c05e4eac34c679cb14ed5f.tar.gz servo-faa8c0e967cd9e3526c05e4eac34c679cb14ed5f.zip |
Remove more Python 2 compatibility code
- os.environ is always `str` in Python 3.
- The only string type is `str` so we can stop using `six.str_types`.
- `iteritems()` isn't necessary because dicts have the `items()` method.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index ee630be47aa..598302f3dda 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -20,7 +20,6 @@ import time import shutil import subprocess from xml.etree.ElementTree import XML -from six import iteritems import wpt import wpt.manifestupdate @@ -62,7 +61,7 @@ TEST_SUITES = OrderedDict([ "include_arg": "test_name"}), ]) -TEST_SUITES_BY_PREFIX = {path: k for k, v in iteritems(TEST_SUITES) if "paths" in v for path in v["paths"]} +TEST_SUITES_BY_PREFIX = {path: k for k, v in TEST_SUITES.items() if "paths" in v for path in v["paths"]} @CommandProvider @@ -133,7 +132,7 @@ class MachCommands(CommandBase): return 1 test_start = time.time() - for suite, tests in iteritems(selected_suites): + for suite, tests in selected_suites.items(): props = suites[suite] kwargs = props.get("kwargs", {}) if tests: @@ -149,7 +148,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 iteritems(TEST_SUITES_BY_PREFIX): + for prefix, suite in TEST_SUITES_BY_PREFIX.items(): if abs_path.startswith(prefix): return suite return None |