Skip to content

Commit 02bdd5d

Browse files
committed
exclude coverage calculations on some exceptional lines
1 parent fa50b6a commit 02bdd5d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

google/api_core/operations_v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from google.api_core.operations_v1.operations_rest_client_async import AsyncOperationsRestClient
3434

3535
__all__ += ["AsyncOperationsRestClient", "AsyncOperationsRestTransport"]
36-
except ImportError:
36+
except ImportError: # pragma: NO COVER
3737
# This import requires the `async_rest` extra.
3838
# Don't raise an exception if `AsyncOperationsRestTransport` cannot be imported
3939
# as other transports are still available.

google/api_core/operations_v1/abstract_operations_base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434
HAS_ASYNC_REST_DEPENDENCIES = True
35-
except ImportError as e:
35+
except ImportError as e: # pragma: NO COVER
3636
HAS_ASYNC_REST_DEPENDENCIES = False
3737
ASYNC_REST_EXCEPTION = e
3838

@@ -51,7 +51,7 @@ class AbstractOperationsBaseClientMeta(type):
5151

5252
_transport_registry = OrderedDict() # type: Dict[str, Type[OperationsTransport]]
5353
_transport_registry["rest"] = OperationsRestTransport
54-
if HAS_ASYNC_REST_DEPENDENCIES:
54+
if HAS_ASYNC_REST_DEPENDENCIES: # pragma: NO COVER
5555
_transport_registry["rest_asyncio"] = AsyncOperationsRestTransport
5656

5757
def get_transport_class(

google/api_core/operations_v1/transports/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
_transport_registry["rest_asyncio"] = cast(
3333
OperationsTransport, AsyncOperationsRestTransport
3434
)
35-
except ImportError:
35+
except ImportError: # pragma: NO COVER
3636
# This import requires the `async_rest` extra.
3737
# Don't raise an exception if `AsyncOperationsRestTransport` cannot be imported
3838
# as other transports are still available.

tests/asyncio/test_rest_streaming_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
try:
3535
from google.auth.aio.transport import Response
36-
except ImportError:
36+
except ImportError: # pragma: NO COVER
3737
pytest.skip(
3838
"google-api-core[async_rest] is required to test asynchronous rest streaming.",
3939
allow_module_level=True,

0 commit comments

Comments
 (0)