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

Also fix the CI failure due to:
https://docs.python.org/3/whatsnew/3.5.html#pep-479-change-stopiteration-handling-inside-generators

Change-Id: Ica582f99730c5019a1212d4f58d7d854ad2996fd
Story: #2005924
Task: #34254
This commit is contained in:
Corey Bryant 2019-07-05 12:08:25 -04:00 committed by Lingxian Kong
parent 25fe9678bd
commit 8e56d90af2
4 changed files with 15 additions and 9 deletions

View File

@ -3,7 +3,7 @@
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python36-jobs
- openstack-python3-train-jobs
- openstackclient-plugin-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -17,6 +17,7 @@ classifier =
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
[files]
packages =

View File

@ -1,7 +1,7 @@
# Python Trove Client
[tox]
envlist = py36,py27,pypy,pep8
envlist = py27,py37,pypy,pep8
minversion = 2.0
skipsdist = True

View File

@ -236,13 +236,18 @@ class Backups(base.ManagerWithFind):
def mistral_execution_generator():
m = marker
while True:
the_list = mistral_client.executions.list(marker=m, limit=50,
sort_dirs='desc')
if the_list:
for the_item in the_list:
yield the_item
m = the_list[-1].id
else:
try:
the_list = mistral_client.executions.list(
marker=m, limit=50,
sort_dirs='desc'
)
if the_list:
for the_item in the_list:
yield the_item
m = the_list[-1].id
else:
return
except StopIteration:
return
def execution_list_generator():