Skip github tests if NVCHECKER_GITHUB_TOKEN not present

This commit is contained in:
Felix Yan 2015-11-05 23:23:21 +08:00
parent 03765db683
commit b8987edaff

View File

@ -1,6 +1,10 @@
import os
import pytest
from tests.helper import ExternalVersionTestCase
@pytest.mark.skipif("NVCHECKER_GITHUB_TOKEN" not in os.environ,
reason="requires NVCHECKER_GITHUB_TOKEN, or it fails too much")
class GitHubTest(ExternalVersionTestCase):
def test_github(self):
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122")