Skip to content

Commit

Permalink
Add testGetNumberQuantaForTask unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
leeskelvin committed Oct 11, 2022
1 parent f0489bb commit e483969
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/changes/DM-36145.feature.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* Add unit test to cover the new getNumberOfQuantaForTask method.
* Add graph interface, getNumberOfQuantaForTask, to determine number of quanta associated with a given taskDef.
* modifications to getQuantaForTask to support showing added additional quanta information in the logger.
4 changes: 4 additions & 0 deletions tests/test_quantumGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def testGetQuantaForTask(self):
for task in self.tasks:
self.assertEqual(self.qGraph.getQuantaForTask(task), self.quantumMap[task])

def testGetNumberOfQuantaForTask(self):
for task in self.tasks:
self.assertEqual(self.qGraph.getNumberOfQuantaForTask(task), len(self.quantumMap[task]))

def testGetNodesForTask(self):
for task in self.tasks:
nodes: Iterable[QuantumNode] = self.qGraph.getNodesForTask(task)
Expand Down

0 comments on commit e483969

Please sign in to comment.