|
| 1 | +# Copyright 2024 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | + |
| 16 | +def test_legacy_imports_retry_unary_sync(): |
| 17 | + # TODO: Delete this test when when we revert these imports on the |
| 18 | + # next major version release |
| 19 | + # (https://github.com/googleapis/python-api-core/issues/576) |
| 20 | + from google.api_core.retry import datetime_helpers # noqa: F401 |
| 21 | + from google.api_core.retry import exceptions # noqa: F401 |
| 22 | + from google.api_core.retry import auth_exceptions # noqa: F401 |
| 23 | + |
| 24 | + |
| 25 | +def test_legacy_imports_retry_unary_async(): |
| 26 | + # TODO: Delete this test when when we revert these imports on the |
| 27 | + # next major version release |
| 28 | + # (https://github.com/googleapis/python-api-core/issues/576) |
| 29 | + from google.api_core import retry_async # noqa: F401 |
| 30 | + |
| 31 | + # See https://github.com/googleapis/python-api-core/issues/586 |
| 32 | + # for context on why we need to test this import this explicitly. |
| 33 | + from google.api_core.retry_async import AsyncRetry # noqa: F401 |
0 commit comments