(self, function, args, kwargs)
| 750 | |
| 751 | @pytest.mark.parametrize('function, args, kwargs', _array_tests) |
| 752 | def test_like_as_none(self, function, args, kwargs): |
| 753 | MyArray = self._create_MyArray() |
| 754 | self.add_method('array', MyArray) |
| 755 | self.add_method(function, MyArray) |
| 756 | np_func = getattr(np, function) |
| 757 | |
| 758 | like_args = tuple(a() if callable(a) else a for a in args) |
| 759 | # required for loadtxt and genfromtxt to init w/o error. |
| 760 | like_args_exp = tuple(a() if callable(a) else a for a in args) |
| 761 | |
| 762 | array_like = np_func(*like_args, **kwargs, like=None) |
| 763 | expected = np_func(*like_args_exp, **kwargs) |
| 764 | # Special-case np.empty to ensure values match |
| 765 | if function == "empty": |
| 766 | array_like.fill(1) |
| 767 | expected.fill(1) |
| 768 | assert_equal(array_like, expected) |
| 769 | |
| 770 | |
| 771 | def test_function_like(): |
nothing calls this directly
no test coverage detected