From cb0dd065eda6bc57bf26f944558c80d08d56efa1 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Mon, 24 Jun 2013 16:39:25 -0700 Subject: [PATCH] Fix run_with_stack_context test. This test would never fail because it didn't check the result of its Future. Thanks to Florian Ludwig for pointing this out. --- tornado/test/stack_context_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tornado/test/stack_context_test.py b/tornado/test/stack_context_test.py index d6f8239e6..26988ddb3 100644 --- a/tornado/test/stack_context_test.py +++ b/tornado/test/stack_context_test.py @@ -256,12 +256,13 @@ class StackContextTest(AsyncTestCase): self.io_loop.add_callback(cb) yield gen.Wait('k1') + @gen_test def test_run_with_stack_context(self): @gen.coroutine def f1(): self.assertEqual(self.active_contexts, ['c1']) yield run_with_stack_context( - StackContext(functools.partial(self.context, 'c1')), + StackContext(functools.partial(self.context, 'c2')), f2) self.assertEqual(self.active_contexts, ['c1']) @@ -272,7 +273,7 @@ class StackContextTest(AsyncTestCase): self.assertEqual(self.active_contexts, ['c1', 'c2']) self.assertEqual(self.active_contexts, []) - run_with_stack_context( + yield run_with_stack_context( StackContext(functools.partial(self.context, 'c1')), f1) self.assertEqual(self.active_contexts, []) -- 2.47.2