-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bitbucket merge pattern. Testable functions.
- Loading branch information
1 parent
180c7ec
commit 7b3ce70
Showing
6 changed files
with
214 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import logging | ||
import socket | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import os | ||
import git | ||
|
||
from ..helpers import project_dir | ||
|
||
__author__ = 'Artur Barseghyan' | ||
__copyright__ = '2019 Artur Barseghyan' | ||
__license__ = 'GPL-2.0-only OR LGPL-2.0-or-later' | ||
__all__ = ( | ||
'ChangelogMixin', | ||
) | ||
|
||
|
||
class ChangelogMixin: | ||
"""Changelog mixin.""" | ||
|
||
@classmethod | ||
def prepare_changelog_data(cls): | ||
"""Prepare data.""" | ||
# if is_internet_available() or is_travis(): | ||
# Test directory for cloning the repo | ||
cls.test_dir = project_dir("tests/matyan-testing") | ||
if not os.path.exists(cls.test_dir): | ||
git.Repo.clone_from( | ||
"https://barseghyanartur@bitbucket.org/barseghyanartur/matyan-testing.git", # NOQA | ||
cls.test_dir, | ||
StrictHostKeyChecking=False | ||
) | ||
|
||
# Go to cloned repository | ||
os.chdir(cls.test_dir) | ||
|
||
# Expected output of the `generate-changelog` command. | ||
changelog_output = project_dir( | ||
'tests/output/generate-changelog.md' | ||
) | ||
with open(changelog_output, 'r') as file: | ||
cls.changelog_output = file.read().strip() | ||
|
||
# Expected output of the `generate-changelog --show-releases` | ||
# command. | ||
changelog_releases_output = project_dir( | ||
'tests/output/generate-changelog-releases.md' | ||
) | ||
with open(changelog_releases_output, 'r') as file: | ||
cls.changelog_releases_output = file.read().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.