googleapis / googleapis/google-cloud-python

[async rest] Add coverage for the import error raised within the async rest transport layer.

Đang mở
#16,260 1 bình luận 0 reaction 1 người được giao Được giao cho @ohmayr Xem trên GitHub
priority: p2 type: process
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

Add unit test coverage for the following import error within `rest_asyncio.py.` file:

```
try:
import aiohttp # type: ignore
from google.auth.aio.transport.sessions import AsyncAuthorizedSession # type: ignore
from google.api_core import rest_streaming_async # type: ignore
{# NOTE: `pragma: NO COVER` is needed since the coverage for presubmits isn't combined. #}
except ImportError as e: # pragma: NO COVER
raise ImportError("`rest_asyncio` transport requires the library to be installed with the `async_rest` extra. Install the library with the `async_rest` extra using `pip install {{ api.naming.warehouse_package_name }}[async_rest]`") from e
```

We want to make sure the error is raised to the user correctly if they don't have the right deps installed.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.