Merge "Enable python3.5 testing."
This commit is contained in:
commit
fd2d68615b
@ -39,13 +39,13 @@ class GlanceExceptionTestCase(test_utils.BaseTestCase):
|
|||||||
class FakeGlanceException(exception.GlanceException):
|
class FakeGlanceException(exception.GlanceException):
|
||||||
message = "default message: %(code)s"
|
message = "default message: %(code)s"
|
||||||
|
|
||||||
exc = FakeGlanceException(code=http.INTERNAL_SERVER_ERROR)
|
exc = FakeGlanceException(code=int(http.INTERNAL_SERVER_ERROR))
|
||||||
self.assertEqual("default message: 500",
|
self.assertEqual("default message: 500",
|
||||||
encodeutils.exception_to_unicode(exc))
|
encodeutils.exception_to_unicode(exc))
|
||||||
|
|
||||||
def test_specified_error_msg_with_kwargs(self):
|
def test_specified_error_msg_with_kwargs(self):
|
||||||
msg = exception.GlanceException('test: %(code)s',
|
msg = exception.GlanceException('test: %(code)s',
|
||||||
code=http.INTERNAL_SERVER_ERROR)
|
code=int(http.INTERNAL_SERVER_ERROR))
|
||||||
self.assertIn('test: 500', encodeutils.exception_to_unicode(msg))
|
self.assertIn('test: 500', encodeutils.exception_to_unicode(msg))
|
||||||
|
|
||||||
def test_non_unicode_error_msg(self):
|
def test_non_unicode_error_msg(self):
|
||||||
|
@ -833,7 +833,7 @@ class TestGlanceAPI(base.IsolatedUnitTest):
|
|||||||
self.assertEqual(http_client.REQUEST_ENTITY_TOO_LARGE, res.status_int)
|
self.assertEqual(http_client.REQUEST_ENTITY_TOO_LARGE, res.status_int)
|
||||||
|
|
||||||
def test_add_image_size_data_exceed_quota(self):
|
def test_add_image_size_data_exceed_quota(self):
|
||||||
quota = http_client.INTERNAL_SERVER_ERROR
|
quota = 500
|
||||||
self.config(user_storage_quota=str(quota))
|
self.config(user_storage_quota=str(quota))
|
||||||
fixture_headers = {
|
fixture_headers = {
|
||||||
'x-image-meta-name': 'fake image #3',
|
'x-image-meta-name': 'fake image #3',
|
||||||
|
12
tox.ini
12
tox.ini
@ -1,14 +1,12 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.3.1
|
minversion = 2.3.1
|
||||||
envlist = py34,py27,pep8
|
envlist = py35,py27,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython =
|
basepython =
|
||||||
python2.7
|
{py27,debug-py27,debug,venv,cover,docs,bandit,pep8,api-ref,genconfig,releasenotes}: python2.7
|
||||||
debug-py27: python2.7
|
{py35,debug-py35}: python3.5
|
||||||
py34: python3.4
|
|
||||||
debug-py34: python3.4
|
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
@ -19,7 +17,7 @@ commands =
|
|||||||
bandit: bandit -c bandit.yaml -r glance -n5 -p gate
|
bandit: bandit -c bandit.yaml -r glance -n5 -p gate
|
||||||
cover: python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
|
cover: python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
|
||||||
debug: oslo_debug_helper {posargs}
|
debug: oslo_debug_helper {posargs}
|
||||||
debug{-py27,-py34}: oslo_debug_helper {posargs}
|
debug{-py27,-py35}: oslo_debug_helper {posargs}
|
||||||
docs: python setup.py build_sphinx
|
docs: python setup.py build_sphinx
|
||||||
py27: ostestr --slowest {posargs}
|
py27: ostestr --slowest {posargs}
|
||||||
releasenotes: sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
releasenotes: sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
@ -27,7 +25,7 @@ commands =
|
|||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
passenv = *_proxy *_PROXY
|
passenv = *_proxy *_PROXY
|
||||||
|
|
||||||
[testenv:py34]
|
[testenv:py35]
|
||||||
commands =
|
commands =
|
||||||
lockutils-wrapper python setup.py testr --slowest --testr-args='glance.tests.unit'
|
lockutils-wrapper python setup.py testr --slowest --testr-args='glance.tests.unit'
|
||||||
python -m testtools.run \
|
python -m testtools.run \
|
||||||
|
Loading…
Reference in New Issue
Block a user