Don't consider version-specific code for coverage.
(Also add generated coverage reports to .gitignore) Change-Id: Ide59ffe812d99774e9e4d0d1ad266ab665f02321
This commit is contained in:
parent
e10de8835b
commit
a09499fc2c
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ doc/build
|
||||
doc/source/api/
|
||||
ChangeLog
|
||||
AUTHORS
|
||||
cover/
|
||||
|
@ -39,7 +39,7 @@ class _BlatherLoggerAdapter(logging.LoggerAdapter):
|
||||
|
||||
|
||||
# TODO(harlowja): we should remove when we no longer have to support 2.6...
|
||||
if sys.version_info[0:2] == (2, 6):
|
||||
if sys.version_info[0:2] == (2, 6): # pragma: nocover
|
||||
|
||||
class _FixedBlatherLoggerAdapter(_BlatherLoggerAdapter):
|
||||
"""Ensures isEnabledFor() exists on adapters that are created."""
|
||||
|
@ -8,7 +8,7 @@ import time
|
||||
|
||||
try:
|
||||
from time import monotonic as now
|
||||
except ImportError:
|
||||
except ImportError: # pragma: nocover
|
||||
from time import time as now
|
||||
|
||||
import requests
|
||||
|
@ -9,6 +9,6 @@ try:
|
||||
from pbr import version as pbr_version
|
||||
_version_info = pbr_version.VersionInfo('cloudinit')
|
||||
version_string = _version_info.version_string
|
||||
except ImportError:
|
||||
except ImportError: # pragma: nocover
|
||||
_version_info = pkg_resources.get_distribution('cloudinit')
|
||||
version_string = lambda: _version_info.version
|
||||
|
Loading…
Reference in New Issue
Block a user