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 ea8e47b commit d71ba4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/matyan/tests/mixins.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import git
import shutil

from ..helpers import project_dir
from ..utils import get_repository
Expand All @@ -15,6 +16,14 @@
class ChangelogMixin:
"""Changelog mixin."""

@classmethod
def clean_up(cls):
"""Clean up."""
shutil.rmtree(os.path.join(cls.test_dir, 'htmlcov'), ignore_errors=True)
ini_file_path = os.path.join(cls.test_dir, '.matyan.ini')
if os.path.exists(ini_file_path):
os.remove(ini_file_path)

@classmethod
def prepare_changelog_data(cls):
"""Prepare data."""
Expand Down
3 changes: 3 additions & 0 deletions src/matyan/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def setUpClass(cls) -> None:

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

Expand Down Expand Up @@ -99,6 +100,8 @@ def test_generate_changelog_show_releases_headings_only(self):
@log_info
def test_generate_changelog_show_releases_unreleased_only(self):
"""Test generate changelog."""
self.repo.checkout('test')
self.repo.checkout('master')
res = generate_changelog(
between='master..test',
include_other=False,
Expand Down

0 comments on commit d71ba4e

Please sign in to comment.