Fix Python3.4 compability

Add Zuul unit test job

Change-Id: I2dbcd27db0d1791c06c212b07f23d1f26e1fd5ad
Closes-Bug: #1814218
This commit is contained in:
Frode Nordahl 2019-02-01 10:15:39 +01:00
parent a85b2d23c1
commit 7c2e09450a
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
3 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,3 @@
- project:
templates:
- python-charm-interface-jobs
- python35-charm-jobs

View File

@ -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):

View File

@ -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