зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638990: [taskgraph] Make test_util_runnable_jobs pass on python 3; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D84077
This commit is contained in:
Родитель
945a1bc550
Коммит
847aa1938f
|
@ -167,7 +167,7 @@ try_task_config_schema_v2 = Schema({
|
|||
|
||||
def full_task_graph_to_runnable_jobs(full_task_json):
|
||||
runnable_jobs = {}
|
||||
for label, node in full_task_json.iteritems():
|
||||
for label, node in six.iteritems(full_task_json):
|
||||
if not ('extra' in node['task'] and 'treeherder' in node['task']['extra']):
|
||||
continue
|
||||
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import pytest
|
||||
from taskgraph.decision import full_task_graph_to_runnable_jobs
|
||||
from taskgraph.graph import Graph
|
||||
from taskgraph.taskgraph import TaskGraph
|
||||
|
@ -54,15 +52,12 @@ class TestRunnableJobs(unittest.TestCase):
|
|||
|
||||
def make_taskgraph(self, tasks):
|
||||
label_to_taskid = {k: k + '-tid' for k in tasks}
|
||||
for label, task_id in label_to_taskid.iteritems():
|
||||
for label, task_id in label_to_taskid.items():
|
||||
tasks[label].task_id = task_id
|
||||
graph = Graph(nodes=set(tasks), edges=set())
|
||||
taskgraph = TaskGraph(tasks, graph)
|
||||
return taskgraph, label_to_taskid
|
||||
|
||||
@pytest.mark.xfail(
|
||||
sys.version_info >= (3, 0), reason="python3 migration is not complete"
|
||||
)
|
||||
def test_taskgraph_to_runnable_jobs(self):
|
||||
tg, label_to_taskid = self.make_taskgraph({
|
||||
t['label']: Task(**t) for t in self.tasks[:]
|
||||
|
|
Загрузка…
Ссылка в новой задаче