for_dtypes_combination(types, names=('dtype', ), full=None)¶
Decorator that checks the fixture with a product set of dtypes.
- types (list of dtypes) – dtypes to be tested.
- names (list of str) – Argument names to which dtypes are passed.
- full (bool) – If
True, then all combinations of dtypes will be tested. Otherwise, the subset of combinations will be tested (see the description below).
Decorator adds the keyword arguments specified by
namesto the test fixture. Then, it runs the fixtures in parallel with passing (possibly a subset of) the product set of dtypes. The range of dtypes is specified by
The combination of dtypes to be tested changes depending on the option
True, all combinations of
typesare tested. Sometimes, such an exhaustive test can be costly. So, if
False, only the subset of possible combinations is tested. Specifically, at first, the shuffled lists of
typesare made for each argument name in
names. Let the lists be
Dnwhere \(n\) is the number of arguments. Then, the combinations to be tested will be
zip(D1, ..., Dn). If
None, the behavior is switched by setting the environment variable
For example, let
[float16, float32, float64]and
['a_type', 'b_type']. If
True, then the decorated test fixture is executed with all \(2^3\) patterns. On the other hand, if
False, shuffled lists are made for
b_type. Suppose the lists are
(16, 64, 32)for
(32, 64, 16)for
b_type(prefixes are removed for short). Then the combinations of
(a_type, b_type)to be tested are