summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-10-21 13:35:53 -0500
committerBrant Knudson <bknudson@us.ibm.com>2015-10-21 13:35:53 -0500
commita8d2bd29347d02298a6a809f6ca52107aae00a4a (patch)
tree95a319987b73ef8a83f5cefe2ec23f1e7f6c350c
parent574fad7abb328276396d7d4c2743982bb903078c (diff)
downloadpython-keystoneclient-a8d2bd29347d02298a6a809f6ca52107aae00a4a.tar.gz
Mark abstractmethod bodies with nocover
abstractmethod bodies aren't going to be called by unit tests, so there's no way to get coverage. The code in an abstractmethod body should be marked with "# pragma: no cover" so that they don't show up as missed in the coverage report. Change-Id: I88a7481ab22f2ce1abfd62badc5f5048acc6929f
-rw-r--r--keystoneclient/auth/identity/base.py2
-rw-r--r--keystoneclient/auth/identity/generic/base.py2
-rw-r--r--keystoneclient/auth/identity/v2.py2
-rw-r--r--keystoneclient/auth/identity/v3/base.py4
-rw-r--r--keystoneclient/auth/identity/v3/federated.py1
-rw-r--r--keystoneclient/base.py2
-rw-r--r--keystoneclient/service_catalog.py10
7 files changed, 12 insertions, 11 deletions
diff --git a/keystoneclient/auth/identity/base.py b/keystoneclient/auth/identity/base.py
index bf7fc72..87e375a 100644
--- a/keystoneclient/auth/identity/base.py
+++ b/keystoneclient/auth/identity/base.py
@@ -184,7 +184,7 @@ class BaseIdentityPlugin(base.BaseAuthPlugin):
:returns: Token access information.
:rtype: :py:class:`keystoneclient.access.AccessInfo`
"""
- pass
+ pass # pragma: no cover
def get_token(self, session, **kwargs):
"""Return a valid auth token.
diff --git a/keystoneclient/auth/identity/generic/base.py b/keystoneclient/auth/identity/generic/base.py
index d366707..b34d186 100644
--- a/keystoneclient/auth/identity/generic/base.py
+++ b/keystoneclient/auth/identity/generic/base.py
@@ -99,7 +99,7 @@ class BaseGenericPlugin(base.BaseIdentityPlugin):
:returns: A plugin that can match the parameters or None if nothing.
"""
- return None
+ return None # pragma: no cover
@property
def _has_domain_scope(self):
diff --git a/keystoneclient/auth/identity/v2.py b/keystoneclient/auth/identity/v2.py
index 3b98eff..abe3e4c 100644
--- a/keystoneclient/auth/identity/v2.py
+++ b/keystoneclient/auth/identity/v2.py
@@ -103,7 +103,7 @@ class Auth(base.BaseIdentityPlugin):
:return: A dict of authentication data for the auth type.
:rtype: dict
"""
- pass
+ pass # pragma: no cover
_NOT_PASSED = object()
diff --git a/keystoneclient/auth/identity/v3/base.py b/keystoneclient/auth/identity/v3/base.py
index a38cd8c..a904fa9 100644
--- a/keystoneclient/auth/identity/v3/base.py
+++ b/keystoneclient/auth/identity/v3/base.py
@@ -85,7 +85,7 @@ class BaseAuth(base.BaseIdentityPlugin):
@abc.abstractmethod
def get_auth_ref(self, session, **kwargs):
- return None
+ return None # pragma: no cover
@classmethod
def get_options(cls):
@@ -240,7 +240,7 @@ class AuthMethod(object):
data for the auth type.
:rtype: tuple(string, dict)
"""
- pass
+ pass # pragma: no cover
@six.add_metaclass(abc.ABCMeta)
diff --git a/keystoneclient/auth/identity/v3/federated.py b/keystoneclient/auth/identity/v3/federated.py
index 18c6d67..fbe086b 100644
--- a/keystoneclient/auth/identity/v3/federated.py
+++ b/keystoneclient/auth/identity/v3/federated.py
@@ -116,3 +116,4 @@ class FederatedBaseAuth(base.BaseAuth):
@abc.abstractmethod
def get_unscoped_auth_ref(self, session, **kwargs):
"""Fetch unscoped federated token."""
+ pass # pragma: no cover
diff --git a/keystoneclient/base.py b/keystoneclient/base.py
index f19ed84..a03ecee 100644
--- a/keystoneclient/base.py
+++ b/keystoneclient/base.py
@@ -242,7 +242,7 @@ class ManagerWithFind(Manager):
@abc.abstractmethod
def list(self):
- pass
+ pass # pragma: no cover
def find(self, **kwargs):
"""Find a single item with attributes matching ``**kwargs``.
diff --git a/keystoneclient/service_catalog.py b/keystoneclient/service_catalog.py
index d0a2719..37f6f0a 100644
--- a/keystoneclient/service_catalog.py
+++ b/keystoneclient/service_catalog.py
@@ -101,7 +101,7 @@ class ServiceCatalog(object):
- `domain_id`: Authorized domain's ID
"""
- raise NotImplementedError()
+ raise NotImplementedError() # pragma: no cover
@abc.abstractmethod
def _is_endpoint_type_match(self, endpoint, endpoint_type):
@@ -110,7 +110,7 @@ class ServiceCatalog(object):
:returns: True if the provided endpoint matches the required
endpoint_type otherwise False.
"""
- pass
+ pass # pragma: no cover
@abc.abstractmethod
def _normalize_endpoint_type(self, endpoint_type):
@@ -123,7 +123,7 @@ class ServiceCatalog(object):
:returns: the endpoint string in the format appropriate for this
service catalog.
"""
- pass
+ pass # pragma: no cover
def get_endpoints(self, service_type=None, endpoint_type=None,
region_name=None, service_name=None):
@@ -229,7 +229,7 @@ class ServiceCatalog(object):
:returns: tuple of urls or None (if no match found)
"""
- raise NotImplementedError()
+ raise NotImplementedError() # pragma: no cover
@utils.positional(3, enforcement=utils.positional.WARN)
def url_for(self, attr=None, filter_value=None,
@@ -303,7 +303,7 @@ class ServiceCatalog(object):
:returns: list containing raw catalog data entries or None
"""
- raise NotImplementedError()
+ raise NotImplementedError() # pragma: no cover
class ServiceCatalogV2(ServiceCatalog):