Skip to content

Commit

Permalink
Adjust tests to expect tasks with no quanta to be dropped from QGs.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Aug 17, 2023
1 parent 8a7d0b7 commit 1284437
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ def testSimpleQGraphSkipExisting_inputs(self):
taskFactory = AddTaskFactoryMock()

qgraph = fwk.makeGraph(self.pipeline, args)
self.assertEqual(len(qgraph.taskGraph), self.nQuanta)
# If all quanta are skipped, the task is not included in the graph.
self.assertEqual(len(qgraph.taskGraph), self.nQuanta - 1)
self.assertEqual(len(qgraph), self.nQuanta - 1)

# Ensure that the output run used in the graph is also used in
Expand Down Expand Up @@ -746,8 +747,9 @@ def testSimpleQGraphSkipExisting_outputs(self):
args.extend_run = True
qgraph = fwk.makeGraph(self.pipeline, args)

self.assertEqual(len(qgraph.taskGraph), self.nQuanta)
# Graph does not include quantum for first task
# First task has no remaining quanta, so is left out completely.
self.assertEqual(len(qgraph.taskGraph), self.nQuanta - 1)
# Graph does not include quantum for first task.
self.assertEqual(len(qgraph), self.nQuanta - 1)

# run whole thing
Expand Down

0 comments on commit 1284437

Please sign in to comment.