Skip to content

Commit

Permalink
Attempt to increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Nov 18, 2019
1 parent 288a32c commit a4413a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
import os
import sys
import pytest
import coverage


def main():
sys.path.insert(0, os.path.abspath('src'))
coverage.process_startup()
return pytest.main()


Expand Down
16 changes: 11 additions & 5 deletions src/matyan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,16 +563,17 @@ def generate_changelog() -> str:
help="Show releases",
)
parser.add_argument(
'--output-file',
dest="show_releases",
'--allow-empty-sections',
dest="allow_empty_sections",
default=False,
action='store_true',
help="Show releases",
help="Allow empty sections",
)
args = parser.parse_args(sys.argv[1:])
between = args.between if validate_between(args.between) else None
include_other = not args.no_other
show_releases = args.show_releases
allow_empty_sections = args.allow_empty_sections

changelog = []

Expand All @@ -588,13 +589,18 @@ def generate_changelog() -> str:

# Do not add branch type if no related branches found
if tickets:
changelog.append("\n**{}**".format(BRANCH_TYPES.get(branch_type)))
changelog.append(
"\n**{}**".format(BRANCH_TYPES.get(branch_type))
)

# Add tickets
for ticket_number, ticket_data in tickets.items():
if branch_type != BRANCH_TYPE_OTHER:
changelog.append(
"\n*{} {}*\n".format(ticket_number, ticket_data['title'])
"\n*{} {}*\n".format(
ticket_number,
ticket_data['title']
)
)
else:
changelog.append('')
Expand Down

0 comments on commit a4413a1

Please sign in to comment.