Fix Python3.4 compability
Add Zuul unit test job Change-Id: I2dbcd27db0d1791c06c212b07f23d1f26e1fd5ad Closes-Bug: #1814218
This commit is contained in:
parent
a85b2d23c1
commit
7c2e09450a
|
@ -1,3 +1,3 @@
|
|||
- project:
|
||||
templates:
|
||||
- python-charm-interface-jobs
|
||||
- python35-charm-jobs
|
||||
|
|
|
@ -339,7 +339,11 @@ class CRM(dict):
|
|||
http://crmsh.github.io/man/#cmdhelp_configure_delete
|
||||
"""
|
||||
if resource not in self['delete_resources']:
|
||||
self['delete_resources'] = (*self['delete_resources'], resource)
|
||||
# NOTE(fnordahl): this unpleasant piece of code is regrettably
|
||||
# necessary for Python3.4 (and trusty) compability see LP: #1814218
|
||||
# and LP: #1813982
|
||||
self['delete_resources'] = tuple(
|
||||
self['delete_resources'] or ()) + (resource,)
|
||||
self.remove_deleted_resources()
|
||||
|
||||
def init_services(self, *resources):
|
||||
|
|
7
tox.ini
7
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = pep8,py35
|
||||
envlist = pep8,py34,py35,py36
|
||||
skipsdist = True
|
||||
skip_missing_interpreters = True
|
||||
|
||||
|
@ -10,6 +10,11 @@ install_command =
|
|||
pip install {opts} {packages}
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:py34]
|
||||
basepython = python3.4
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = ostestr {posargs}
|
||||
|
||||
[testenv:py35]
|
||||
basepython = python3.5
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
|
Loading…
Reference in New Issue