Batch the classes into groups of batchSize. :param: batchNo - if the set of classes is a subgroup then this is the index of the subgroup. :param: batchSize - if the set of classes is a subgroup then this is the size of the subgroup.
(vtkClasses, batchNo, batchSize)
| 418 | idx += 1 |
| 419 | |
| 420 | def BatchTest(vtkClasses, batchNo, batchSize): |
| 421 | ''' |
| 422 | Batch the classes into groups of batchSize. |
| 423 | |
| 424 | :param: batchNo - if the set of classes is a subgroup then this |
| 425 | is the index of the subgroup. |
| 426 | :param: batchSize - if the set of classes is a subgroup then this |
| 427 | is the size of the subgroup. |
| 428 | ''' |
| 429 | idx = 0 |
| 430 | total = 0; |
| 431 | batch = set() |
| 432 | for a in vtkClasses: |
| 433 | currentBatchNo = idx // batchSize; |
| 434 | if currentBatchNo == batchNo: |
| 435 | batch.add(a) |
| 436 | total += 1 |
| 437 | if total == batchSize: |
| 438 | TestEmptyInput(batch, batchNo, batchSize) |
| 439 | print(total) |
| 440 | batch = set() |
| 441 | total = 0 |
| 442 | idx += 1 |
| 443 | if batch: |
| 444 | TestEmptyInput(batch, batchNo, batchSize) |
| 445 | print(total) |
| 446 | |
| 447 | def PrintResultSummary(): |
| 448 | print('-' * 40) |
nothing calls this directly
no test coverage detected