Update testing configuration:
(1) Add py35 job to Travis. (2) To address issue #57: run tests that connect to Mojang's auth server exactly once, during the py35 job. (3) Measure coverage exactly once, during the py35 job; always submit the result to coveralls. (4) Fix miscellaneous errors in generate_travis_yml.py.
This commit is contained in:
1 parent
19cdf80952
commit
3f4571d9e9
4 files changed
+44
-27
No files matched your search
@@ -7,6 +7,7 @@ from minecraft.exceptions import YggdrasilError
|
||||
import requests
|
||||
import json
|
||||
import unittest
|
||||
import os
|
||||
from .compat import mock
|
||||
|
||||
FAKE_DATA = {
|
||||
@@ -56,6 +57,14 @@ def should_skip_cred_test():
|
||||
return False
|
||||
|
||||
|
||||
def should_run_internet_tests():
|
||||
"""
|
||||
Returns `True` if tests involving access to Internet resources
|
||||
should *not* be skipped. Otherwise returns `False`.
|
||||
"""
|
||||
return os.environ.get('PYCRAFT_RUN_INTERNET_TESTS')
|
||||
|
||||
|
||||
class InitProfile(unittest.TestCase):
|
||||
def test_init_no_values(self):
|
||||
p = Profile()
|
||||
@@ -194,6 +203,8 @@ class AuthenticateAuthenticationToken(unittest.TestCase):
|
||||
self.assertTrue(resp)
|
||||
|
||||
|
||||
@unittest.skipUnless(should_run_internet_tests(),
|
||||
"Tests involving Internet access are disabled.")
|
||||
class MakeRequest(unittest.TestCase):
|
||||
def test_make_request_http_method(self):
|
||||
res = _make_request(AUTHSERVER, "authenticate", {"Billy": "Bob"})
|
||||
|
||||
Reference in new issue
Block a user