def METHOD_NAME(self, func, axes):
    expected_exc = ValueError
    fn_np = getattr(np, func)
    fn_num = getattr(num, func)
    with pytest.raises(expected_exc):
        fn_np(self.in_np, axis=axes)
    with pytest.raises(expected_exc):
        fn_num(self.in_num, axis=axes)