forked from pool/python-openstacksdk
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
|
|
From b3723bed9dd2b336c63aa9bcf5a3e1ce08e2e290 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
|
||
|
|
Date: Mon, 25 Mar 2019 11:01:00 +0000
|
||
|
|
Subject: [PATCH] add python 3.7 unit test job
|
||
|
|
|
||
|
|
See ML discussion here [1] for context.
|
||
|
|
|
||
|
|
[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
|
||
|
|
|
||
|
|
Change-Id: If472ec316c5f5aaee15aab4d72964f806d3efff7
|
||
|
|
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
|
||
|
|
---
|
||
|
|
.zuul.yaml | 1 +
|
||
|
|
openstack/tests/unit/test_resource.py | 5 ++++-
|
||
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/.zuul.yaml b/.zuul.yaml
|
||
|
|
index 6d0dcf81..ee9dea9f 100644
|
||
|
|
--- a/.zuul.yaml
|
||
|
|
+++ b/.zuul.yaml
|
||
|
|
@@ -396,6 +396,7 @@
|
||
|
|
- openstack-lower-constraints-jobs
|
||
|
|
- openstack-python-jobs
|
||
|
|
- openstack-python36-jobs
|
||
|
|
+ - openstack-python37-jobs
|
||
|
|
- openstacksdk-functional-tips
|
||
|
|
- openstacksdk-tox-tips
|
||
|
|
- os-client-config-tox-tips
|
||
|
|
diff --git a/openstack/tests/unit/test_resource.py b/openstack/tests/unit/test_resource.py
|
||
|
|
index ee98777f..7b44a60d 100644
|
||
|
|
--- a/openstack/tests/unit/test_resource.py
|
||
|
|
+++ b/openstack/tests/unit/test_resource.py
|
||
|
|
@@ -1901,7 +1901,10 @@ class TestResourceActions(base.TestCase):
|
||
|
|
microversion=None)
|
||
|
|
|
||
|
|
# Ensure we're done after those three items
|
||
|
|
- self.assertRaises(StopIteration, next, results)
|
||
|
|
+ # In python3.7, PEP 479 is enabled for all code, and StopIteration
|
||
|
|
+ # raised directly from code is turned into a RuntimeError.
|
||
|
|
+ # Something about how mock is implemented triggers that here.
|
||
|
|
+ self.assertRaises((StopIteration, RuntimeError), next, results)
|
||
|
|
|
||
|
|
# Ensure we only made two calls to get this done
|
||
|
|
self.assertEqual(3, len(self.session.get.call_args_list))
|
||
|
|
--
|
||
|
|
2.21.0
|
||
|
|
|