| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 92445a9 commit 4a6c2b6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,9 +13,17 @@ | |||
| 13 | 13 | # See the License for the specific language governing permissions and | |
| 14 | 14 | # limitations under the License. | |
| 15 | 15 | # | |
| 16 | - import math | ||
| 17 | 16 | import os | |
| 18 | 17 | ||
| 18 | + # try/except added for compatibility with python < 3.8 | ||
| 19 | + try: | ||
| 20 | + from unittest import mock | ||
| 21 | + from unittest.mock import AsyncMock | ||
| 22 | + except ImportError: | ||
| 23 | + import mock | ||
| 24 | + | ||
| 25 | + import math | ||
| 26 | + | ||
| 19 | 27 | from google.api_core import gapic_v1, grpc_helpers, grpc_helpers_async, path_template | |
| 20 | 28 | from google.api_core import client_options | |
| 21 | 29 | from google.api_core import exceptions as core_exceptions | |
@@ -33,7 +41,6 @@ | |||
| 33 | 41 | from google.type import timeofday_pb2 # type: ignore | |
| 34 | 42 | import grpc | |
| 35 | 43 | from grpc.experimental import aio | |
| 36 | - import mock | ||
| 37 | 44 | from proto.marshal.rules.dates import DurationRule, TimestampRule | |
| 38 | 45 | import pytest | |
| 39 | 46 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments