(self, function, args, kwargs, ref)
| 638 | @pytest.mark.parametrize('function, args, kwargs', _array_tests) |
| 639 | @pytest.mark.parametrize('ref', [1, [1], "MyNoArrayFunctionArray"]) |
| 640 | def test_no_array_function_like(self, function, args, kwargs, ref): |
| 641 | self.add_method('array', self.MyNoArrayFunctionArray) |
| 642 | self.add_method(function, self.MyNoArrayFunctionArray) |
| 643 | np_func = getattr(np, function) |
| 644 | |
| 645 | # Instantiate ref if it's the MyNoArrayFunctionArray class |
| 646 | if ref == "MyNoArrayFunctionArray": |
| 647 | ref = self.MyNoArrayFunctionArray.array() |
| 648 | |
| 649 | like_args = tuple(a() if callable(a) else a for a in args) |
| 650 | |
| 651 | with assert_raises_regex(TypeError, |
| 652 | 'The `like` argument must be an array-like that implements'): |
| 653 | np_func(*like_args, **kwargs, like=ref) |
| 654 | |
| 655 | @pytest.mark.parametrize('numpy_ref', [True, False]) |
| 656 | def test_array_like_fromfile(self, numpy_ref): |
nothing calls this directly
no test coverage detected