summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-12-09 09:52:00 +0000
committerGerrit Code Review <review@openstack.org>2014-12-09 09:52:00 +0000
commit34caedc34224058cc9a87309e2e8c48969af772f (patch)
treee660de3b40d7da1cdfc9fba2e4784fa0a49ef55b
parent9c3477dae10af1d4d622d5c9ff90b9d84d5800b4 (diff)
parent86c136a0847c6c329d61153197a89ec7bdcbda12 (diff)
downloadoslo-db-34caedc34224058cc9a87309e2e8c48969af772f.tar.gz
Merge "Fix nested() for py3"
-rw-r--r--tests/utils.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 3f29d25..44eb1ae 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -25,9 +25,7 @@ if six.PY3:
@contextlib.contextmanager
def nested(*contexts):
with contextlib.ExitStack() as stack:
- for c in contexts:
- stack.enter_context(c)
- yield
+ yield [stack.enter_context(c) for c in contexts]
else:
nested = contextlib.nested