Count the number of test executions needed for a test set. Args: test_set: The test set to run. block_sizes: The block sizes to run. Return: The number of test executions needed.
(test_set: TestSet, block_sizes: list[str])
| 69 | |
| 70 | |
| 71 | def count_test_set(test_set: TestSet, block_sizes: list[str]) -> int: |
| 72 | ''' |
| 73 | Count the number of test executions needed for a test set. |
| 74 | |
| 75 | Args: |
| 76 | test_set: The test set to run. |
| 77 | block_sizes: The block sizes to run. |
| 78 | |
| 79 | Return: |
| 80 | The number of test executions needed. |
| 81 | ''' |
| 82 | count = 0 |
| 83 | for block_size in block_sizes: |
| 84 | for image in test_set.tests: |
| 85 | # 3D block sizes require 3D images |
| 86 | if is_3d(block_size) != image.is_3d: |
| 87 | continue |
| 88 | |
| 89 | count += 1 |
| 90 | |
| 91 | return count |
| 92 | |
| 93 | |
| 94 | def determine_result(image: TestImage, reference: Record, |