Bug 1637041: fix test_presets.py on windows r=rstewart

In some NT-specific code, a list of "items()" was being updated. In python 3, to modify the result
of "items()", you have to gain ownership first by explicitly converting it into a list().

Also resolves some flaky failures that were seen locally by marking test_presets.py as sequential.

Differential Revision: https://phabricator.services.mozilla.com/D74793
This commit is contained in:
Mitchell Hentges 2020-05-12 17:52:00 +00:00
Родитель 2f3cb65cb5
Коммит c23cde122b
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -79,7 +79,7 @@ def pytest_generate_tests(metafunc):
elif all(fixture in metafunc.fixturenames for fixture in ('shared_name', 'shared_preset')):
preset_path = os.path.join(push.build.topsrcdir, 'tools', 'tryselect', 'try_presets.yml')
with open(preset_path, 'r') as fh:
presets = yaml.safe_load(fh).items()
presets = list(yaml.safe_load(fh).items())
ids = [p[0] for p in presets]

Просмотреть файл

@ -7,5 +7,8 @@ requirements = tools/tryselect/selectors/chooser/requirements.txt
[test_fuzzy.py]
[test_mozharness_integration.py]
[test_presets.py]
# Modifies "task_duration_history.json" in .mozbuild. Since other tests depend on this file, this test
# shouldn't be run in parallel with those other tests.
sequential = true
[test_tasks.py]
[test_task_configs.py]