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 552ef86 commit 288a32c
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/matyan/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@ class TestCommands(unittest.TestCase):
def setUpClass(cls):
"""Set up."""
super(TestCommands, cls).setUpClass()
if is_internet_available() or is_travis():
# Test directory for cloning the repo
test_dir = project_dir("tests/matyan-testing")
if not os.path.exists(test_dir):
git.Repo.clone_from(
"https://barseghyanartur@bitbucket.org/barseghyanartur/matyan-testing.git", # NOQA
test_dir,
StrictHostKeyChecking=False
)
# if is_internet_available() or is_travis():
# Test directory for cloning the repo
test_dir = project_dir("tests/matyan-testing")
if not os.path.exists(test_dir):
git.Repo.clone_from(
"https://barseghyanartur@bitbucket.org/barseghyanartur/matyan-testing.git", # NOQA
test_dir,
StrictHostKeyChecking=False
)

# Go to cloned repository
os.chdir(test_dir)
# Go to cloned repository
os.chdir(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` 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()
# 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()

@internet_available_or_is_travis_only
# @internet_available_or_is_travis_only
@log_info
def test_01_generate_changelog_command(self):
"""Test generate changelog command."""
Expand All @@ -67,7 +67,7 @@ def test_01_generate_changelog_command(self):
self.assertEqual(res, self.changelog_output)
return res

@internet_available_or_is_travis_only
# @internet_available_or_is_travis_only
@log_info
def test_02_generate_changelog_command_show_releases(self):
"""Test generate changelog command."""
Expand Down

0 comments on commit 288a32c

Please sign in to comment.