From 822e91a40ff53077699e1586d26dd7c158850661 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 26 May 2013 21:54:07 -0400 Subject: [PATCH] Use py26-compatible syntax in tests. --- tornado/test/stack_context_test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tornado/test/stack_context_test.py b/tornado/test/stack_context_test.py index 192bf8914..a8af08ae8 100644 --- a/tornado/test/stack_context_test.py +++ b/tornado/test/stack_context_test.py @@ -149,10 +149,11 @@ class StackContextTest(AsyncTestCase): # Remove the test's stack context to make sure we can cover # the case where the last context is deactivated. with NullContext(): - with StackContext(functools.partial(self.context, 'c0')) as c0,\ - StackContext(functools.partial(self.context, 'c1')) as c1,\ - StackContext(functools.partial(self.context, 'c2')) as c2: - return (wrap(check_contexts), [c0, c1, c2]) + partial = functools.partial + with StackContext(partial(self.context, 'c0')) as c0: + with StackContext(partial(self.context, 'c1')) as c1: + with StackContext(partial(self.context, 'c2')) as c2: + return (wrap(check_contexts), [c0, c1, c2]) # First make sure the test mechanism works without any deactivations func, deactivate_callbacks = make_wrapped_function() -- 2.47.2