Skip to content

Commit

Permalink
Fix travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Nov 27, 2019
1 parent 818a831 commit ea8e47b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/matyan/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import git

from ..helpers import project_dir
from ..utils import get_repository

__author__ = 'Artur Barseghyan'
__copyright__ = '2019 Artur Barseghyan'
Expand All @@ -26,6 +27,10 @@ def prepare_changelog_data(cls):
cls.test_dir,
StrictHostKeyChecking=False
)
cls.repo = get_repository(cls.test_dir)
else:
cls.repo = get_repository(cls.test_dir)
cls.repo.pull()

# Go to cloned repository
os.chdir(cls.test_dir)
Expand Down
2 changes: 1 addition & 1 deletion src/matyan/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ class TestCore(unittest.TestCase, ChangelogMixin):
def setUpClass(cls) -> None:
super(TestCore, cls).setUpClass()
cls.prepare_changelog_data()
cls.repo = get_repository(cls.test_dir)

def tearDown(self):
super(TestCore, self).tearDown()
self.repo.checkout('master')
self.repo.pull()

@log_info
def test_generate_changelog(self):
Expand Down
1 change: 1 addition & 0 deletions src/matyan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'generate_changelog_cli',
'get_branch_type',
'get_logs',
'get_repository',
'json_changelog',
'json_changelog_cli',
'make_config_file',
Expand Down

0 comments on commit ea8e47b

Please sign in to comment.