|
1 | 1 | import math |
2 | 2 | import operator |
3 | 3 | from enum import Enum, auto |
4 | | -from typing import Callable, List, NamedTuple, Optional, TypeVar, Union |
| 4 | +from typing import Callable, List, NamedTuple, Optional, Sequence, TypeVar, Union |
5 | 5 |
|
6 | 6 | import pytest |
7 | 7 | from hypothesis import assume, given |
@@ -37,7 +37,7 @@ class OnewayPromotableDtypes(NamedTuple): |
37 | 37 |
|
38 | 38 | @st.composite |
39 | 39 | def oneway_promotable_dtypes( |
40 | | - draw, dtypes: List[DataType] |
| 40 | + draw, dtypes: Sequence[DataType] |
41 | 41 | ) -> st.SearchStrategy[OnewayPromotableDtypes]: |
42 | 42 | """Return a strategy for input dtypes that promote to result dtypes.""" |
43 | 43 | d1, d2 = draw(hh.mutually_promotable_dtypes(dtypes=dtypes)) |
@@ -346,7 +346,7 @@ def __repr__(self): |
346 | 346 |
|
347 | 347 |
|
348 | 348 | def make_binary_params( |
349 | | - elwise_func_name: str, dtypes: List[DataType] |
| 349 | + elwise_func_name: str, dtypes: Sequence[DataType] |
350 | 350 | ) -> List[Param[BinaryParamContext]]: |
351 | 351 | if hh.FILTER_UNDEFINED_DTYPES: |
352 | 352 | dtypes = [d for d in dtypes if not isinstance(d, xp._UndefinedStub)] |
@@ -1143,9 +1143,7 @@ def test_pow(ctx, data): |
1143 | 1143 |
|
1144 | 1144 | binary_param_assert_dtype(ctx, left, right, res) |
1145 | 1145 | binary_param_assert_shape(ctx, left, right, res) |
1146 | | - binary_param_assert_against_refimpl( |
1147 | | - ctx, left, right, res, "**", math.pow, strict_check=False |
1148 | | - ) |
| 1146 | + # Values testing pow is too finicky |
1149 | 1147 |
|
1150 | 1148 |
|
1151 | 1149 | @pytest.mark.parametrize("ctx", make_binary_params("remainder", dh.numeric_dtypes)) |
|
0 commit comments