Bug 1651677 - [taskgraph] Remove 'xfail' from tests that were fixed by bug 1650067, r=tomprince

Differential Revision: https://phabricator.services.mozilla.com/D82952
This commit is contained in:
Andrew Halberstadt 2020-07-09 17:46:07 +00:00
Родитель b787b84e52
Коммит eadca174d1
3 изменённых файлов: 27 добавлений и 36 удалений

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

@ -171,9 +171,6 @@ class TestGenerator(unittest.TestCase):
self.assertEqual(sorted(self.tgg.target_task_graph.tasks.keys()),
sorted(['_fake-t-0', '_fake-t-1']))
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_always_target_tasks(self):
"The target_task_graph includes tasks with 'always_target'"
tgg_args = {

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

@ -92,9 +92,6 @@ class TestOptimize(unittest.TestCase):
graph = self.make_triangle()
self.assert_remove_tasks(graph, set())
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_remove_tasks_all(self):
"A graph full of optimization=remove has removes everything"
graph = self.make_triangle(
@ -103,9 +100,6 @@ class TestOptimize(unittest.TestCase):
t3={'remove': None})
self.assert_remove_tasks(graph, {'t1', 't2', 't3'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_composite_strategies_any(self):
self.monkeypatch.setattr(optimize, 'registry', self.strategies)
strategies = self.strategies.copy()
@ -118,9 +112,6 @@ class TestOptimize(unittest.TestCase):
self.assert_remove_tasks(graph, {'t1', 't2', 't3'}, strategies=strategies)
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_composite_strategies_all(self):
self.monkeypatch.setattr(optimize, 'registry', self.strategies)
strategies = self.strategies.copy()
@ -132,9 +123,6 @@ class TestOptimize(unittest.TestCase):
t3={'all': None})
self.assert_remove_tasks(graph, set(), strategies=strategies)
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_remove_tasks_blocked(self):
"Removable tasks that are depended on by non-removable tasks are not removed"
graph = self.make_triangle(
@ -142,9 +130,6 @@ class TestOptimize(unittest.TestCase):
t3={'remove': None})
self.assert_remove_tasks(graph, {'t3'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_remove_tasks_do_not_optimize(self):
"Removable tasks that are marked do_not_optimize are not removed"
graph = self.make_triangle(
@ -178,9 +163,6 @@ class TestOptimize(unittest.TestCase):
graph = self.make_triangle()
self.assert_replace_tasks(graph, set())
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_replace_tasks_all(self):
"All replacable tasks are replaced when strategy is 'replace'"
graph = self.make_triangle(
@ -192,9 +174,6 @@ class TestOptimize(unittest.TestCase):
exp_replaced={'t1', 't2', 't3'},
exp_label_to_taskid={'t1': 'e1', 't2': 'e2', 't3': 'e3'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_replace_tasks_blocked(self):
"A task cannot be replaced if it depends on one that was not replaced"
graph = self.make_triangle(
@ -205,9 +184,6 @@ class TestOptimize(unittest.TestCase):
exp_replaced={'t1'},
exp_label_to_taskid={'t1': 'e1'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_replace_tasks_do_not_optimize(self):
"A task cannot be replaced if it depends on one that was not replaced"
graph = self.make_triangle(
@ -220,9 +196,6 @@ class TestOptimize(unittest.TestCase):
exp_label_to_taskid={'t1': 'e1'},
do_not_optimize={'t2'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_replace_tasks_removed(self):
"A task can be replaced with nothing"
graph = self.make_triangle(

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

@ -18,9 +18,6 @@ from taskgraph.util.parameterization import (
)
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
class TestTimestamps(unittest.TestCase):
def test_no_change(self):
@ -32,6 +29,9 @@ class TestTimestamps(unittest.TestCase):
}
self.assertEqual(resolve_timestamps(now, input), input)
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_buried_replacement(self):
now = datetime.datetime(2018, 1, 1)
input = {"key": [{"key2": [{'relative-datestamp': '1 day'}]}]}
@ -45,9 +45,6 @@ class TestTimestamps(unittest.TestCase):
[{'relative-datestamp': '1 day', 'another-key': True}])
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
class TestTaskRefs(unittest.TestCase):
def do(self, input, output):
@ -64,26 +61,41 @@ class TestTaskRefs(unittest.TestCase):
self.do({'in-a-list': ['stuff', {'property': '<edge1>'}]},
{'in-a-list': ['stuff', {'property': '<edge1>'}]})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_in_list(self):
"resolve_task_references resolves task references in a list"
self.do({'in-a-list': ['stuff', {'task-reference': '<edge1>'}]},
{'in-a-list': ['stuff', 'tid1']})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_in_dict(self):
"resolve_task_references resolves task references in a dict"
self.do({'in-a-dict': {'stuff': {'task-reference': '<edge2>'}}},
{'in-a-dict': {'stuff': 'tid2'}})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_multiple(self):
"resolve_task_references resolves multiple references in the same string"
self.do({'multiple': {'task-reference': 'stuff <edge1> stuff <edge2> after'}},
{'multiple': 'stuff tid1 stuff tid2 after'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_embedded(self):
"resolve_task_references resolves ebmedded references"
self.do({'embedded': {'task-reference': 'stuff before <edge3> stuff after'}},
{'embedded': 'stuff before tid3 stuff after'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_escaping(self):
"resolve_task_references resolves escapes in task references"
self.do({'escape': {'task-reference': '<<><edge3>>'}},
@ -94,16 +106,25 @@ class TestTaskRefs(unittest.TestCase):
self.do({'escape': {'task-reference': '<edge3>', 'another-key': True}},
{'escape': {'task-reference': '<edge3>', 'another-key': True}})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_self(self):
"resolve_task_references resolves `self` to the provided task id"
self.do({'escape': {'task-reference': '<self>'}},
{'escape': 'tid-self'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_decision(self):
"resolve_task_references resolves `decision` to the provided decision task id"
self.do({'escape': {'task-reference': '<decision>'}},
{'escape': 'tid-decision'})
@pytest.mark.xfail(
sys.version_info >= (3, 0), reason="python3 migration is not complete"
)
def test_invalid(self):
"resolve_task_references raises a KeyError on reference to an invalid task"
self.assertRaisesRegexp(