googleapis / googleapis/google-cloud-python

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

オープン
#16,260 コメント 1 件 リアクション 0 件 担当者 1 名 @ohmayr に割り当て済み GitHub で見る
priority: p2 type: process
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
2日 23時間
マージ済み PR(30日)
123

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。