Add Python 3 Train unit tests

This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Note that python35-charm-jobs is retained since this charm is supported
on Xenial.

Change-Id: I92c63ab07a70fb0fa7e7788b1226866a8b228ec9
Story: #2005924
Task: #34228
This commit is contained in:
Corey Bryant 2019-07-12 14:29:15 -04:00
parent 721200647b
commit 79774c3905
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,4 @@
- project:
templates:
- python35-charm-jobs
- openstack-python3-train-jobs

16
tox.ini
View File

@ -3,7 +3,7 @@
# within individual charm repos.
[tox]
skipsdist = True
envlist = pep8,py3
envlist = pep8,py37
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -66,6 +66,20 @@ commands =
coverage xml -o cover/coverage.xml
coverage report
[testenv:py37]
basepython = python3.7
deps = -r{toxinidir}/test-requirements.txt
setenv =
{[testenv]setenv}
PYTHON=coverage run
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:pep8]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt