Skip to content

Commit

Permalink
tests: Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dummy committed Mar 27, 2024
1 parent 4563692 commit 2728aeb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
from duty import duty
from duty.callables import coverage, lazy, mkdocs, mypy, pytest, ruff, safety

from git_changelog import Changelog
from git_changelog.commit import AngularConvention

if TYPE_CHECKING:
from duty.context import Context

Expand Down Expand Up @@ -298,6 +295,12 @@ def profile(ctx: Context, merge: int = 15) -> None:
Parameters:
merge: Number of times to merge a branch in the temporary repository.
"""
# Do not import those from the top level,
# as it prevents the pytest-cov plugin for marking
# lines executed at import time as covered.
from git_changelog import Changelog
from git_changelog.commit import AngularConvention

try:
from tests.helpers import GitRepo
except ModuleNotFoundError:
Expand Down

0 comments on commit 2728aeb

Please sign in to comment.