MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / count_test_set

Function count_test_set

Test/astc_test_image.py:71–91  ·  view source on GitHub ↗

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])

Source from the content-addressed store, hash-verified

69
70
71def 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
94def determine_result(image: TestImage, reference: Record,

Callers 1

run_test_setFunction · 0.85

Calls 1

is_3dFunction · 0.85

Tested by

no test coverage detected