From: Ben Darnell Date: Mon, 24 Jun 2013 23:39:25 +0000 (-0700) Subject: Fix run_with_stack_context test. X-Git-Tag: v3.2.0b1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb0dd065eda6bc57bf26f944558c80d08d56efa1;p=thirdparty%2Ftornado.git 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. --- 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, [])