Test each class in batch for empty input. :param: batch - the set of classes to be tested. :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
(batch, batchNo=0, batchSize=0)
| 372 | raise |
| 373 | |
| 374 | def TestEmptyInput(batch, batchNo=0, batchSize=0): |
| 375 | ''' |
| 376 | Test each class in batch for empty input. |
| 377 | |
| 378 | :param: batch - the set of classes to be tested. |
| 379 | :param: batchNo - if the set of classes is a subgroup then this |
| 380 | is the index of the subgroup. |
| 381 | :param: batchSize - if the set of classes is a subgroup then this |
| 382 | is the size of the subgroup. |
| 383 | ''' |
| 384 | baseIdx = batchNo * batchSize |
| 385 | idx = baseIdx |
| 386 | for a in batch: |
| 387 | batchIdx = idx - baseIdx |
| 388 | res = " Testing -- {:4d} - {:s}".format(idx,a) |
| 389 | if (batchIdx < len(batch) - 1): |
| 390 | nextRes = " Next -- {:4d} - {:s}".format(idx + 1,list(batch)[batchIdx +1]) |
| 391 | else: |
| 392 | nextRes = "No next" |
| 393 | # if verbose: |
| 394 | # print(res, nextRes) |
| 395 | classesTested.add(a) |
| 396 | ok = TestOne(a) |
| 397 | if ok == 0: |
| 398 | if verbose: |
| 399 | print(res + ' - Fail') |
| 400 | elif ok == 1: |
| 401 | if verbose: |
| 402 | print(res + ' - Ok') |
| 403 | elif ok == 2: |
| 404 | if verbose: |
| 405 | print(res + ' - no observer could be added.') |
| 406 | elif ok == 3: |
| 407 | if verbose: |
| 408 | print(res + ' - is Abstract') |
| 409 | elif ok == 4: |
| 410 | if verbose: |
| 411 | print(res + ' - No concrete implementation') |
| 412 | elif ok == 5: |
| 413 | if verbose: |
| 414 | print(res + ' - Does not exist') |
| 415 | else: |
| 416 | if verbose: |
| 417 | print(res + ' - Unknown status') |
| 418 | idx += 1 |
| 419 | |
| 420 | def BatchTest(vtkClasses, batchNo, batchSize): |
| 421 | ''' |