From: Ben Darnell Date: Mon, 27 May 2013 01:54:07 +0000 (-0400) Subject: Use py26-compatible syntax in tests. X-Git-Tag: v3.1.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=822e91a40ff53077699e1586d26dd7c158850661;p=thirdparty%2Ftornado.git Use py26-compatible syntax in tests. --- 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()