nvchecker/tests/test_vcs.py

19 lines
820 B
Python
Raw Normal View History

2015-11-05 12:59:07 +00:00
import os
import shutil
import pytest
from tests.helper import ExternalVersionTestCase
class VCSTest(ExternalVersionTestCase):
@pytest.mark.skipif(shutil.which("git") is None,
reason="requires git command")
def test_git(self):
os.path.exists("example") or os.mkdir("example")
self.assertEqual(self.sync_get_version("example", {"vcs": "git+https://github.com/harry-sanabria/ReleaseTestRepo.git"}), "1.1.2b3cdf6134b07ae6ac77f11b586dc1ae6d1521db")
@pytest.mark.skipif(shutil.which("hg") is None,
reason="requires hg command")
def test_mercurial(self):
os.path.exists("example") or os.mkdir("example")
self.assertEqual(self.sync_get_version("example", {"vcs": "hg+https://bitbucket.org/pil0t/testrepo"}), "1.1.84679e29c7d9")