Skip to content

Commit

Permalink
Do not count python version related imports in coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinolog committed Apr 13, 2017
1 parent aed42e1 commit 251f329
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions logwrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
from ._repr_utils import PrettyFormat, pretty_repr, pretty_str

# pylint: disable=no-name-in-module
if six.PY3:
if six.PY3: # pragma: no cover
from ._log_wrap3 import logwrap, LogWrap
else:
else: # pragma: no cover
from ._log_wrap2 import logwrap, LogWrap
# pylint: enable=no-name-in-module

Expand All @@ -44,7 +44,7 @@
'pretty_str'
)

except ImportError:
except ImportError: # pragma: no cover
# Package is not installed
six = PrettyFormat = pretty_repr = pretty_str = logwrap = LogWrap = None

Expand Down
4 changes: 2 additions & 2 deletions logwrap/_repr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import six

# pylint: disable=ungrouped-imports, no-name-in-module
if six.PY3:
if six.PY3: # pragma: no cover
from inspect import (
Parameter,
signature,
)
else:
else: # pragma: no cover
# noinspection PyUnresolvedReferences
from funcsigs import (
Parameter,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ deps =

commands =
py.test -vv --junitxml=unit_result.xml --cov-config .coveragerc --cov-report html --cov=logwrap {posargs:test}
coverage report --fail-under 85
coverage report --fail-under 89

[testenv:venv]
commands = {posargs:}
Expand Down

0 comments on commit 251f329

Please sign in to comment.