def test_all_nan_numpy_compat(self, func_name, ndim):
        """This test checks if we comply with the expected behavior when
        the array contains only NaNs. The expected behavior is to
        raise a ValueError.
        """
        settings.numpy_compat = True

        shape = (3,) * ndim
        in_num = num.zeros(shape)
        in_num.fill(num.nan)

        func_num = getattr(num, func_name)

        expected_exp = ValueError
        with pytest.raises(expected_exp):
            func_num(in_num)

        settings.numpy_compat.unset_value()
This test checks if we comply with the expected behavior when
        the array contains only NaNs. The expected behavior is to
        raise a ValueError.
        
tests/integration/test_nanarg_reduction.py