Skip to content

Commit

Permalink
Merge pull request spyder-ide#9371 from ccordoba12/fix-tests
Browse files Browse the repository at this point in the history
PR: Fix test_get_git_refs when run by Travis on tags
  • Loading branch information
ccordoba12 committed May 19, 2019
2 parents b17ea0d + 82b9ad3 commit e2d7f7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spyder/utils/tests/test_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ def test_git_revision():


def test_get_git_refs():
braches_tags, branch, files_modified = get_git_refs(__file__)
branch_tags, branch, files_modified = get_git_refs(__file__)
assert bool(branch) # This must always return a branch_name
assert len(files_modified) >= 0
assert any(['master' in b for b in braches_tags])

# It seems when Travis run tests on tags, master doesn't
# appear among the list of git branches.
if not os.environ.get('TRAVIS_TAG'):
assert any(['master' in b for b in branch_tags])


if __name__ == "__main__":
Expand Down

0 comments on commit e2d7f7d

Please sign in to comment.