From: Niko Wilbert Date: Fri, 22 Aug 2014 08:48:42 +0000 (+0200) Subject: Fixed support for test generators X-Git-Tag: v4.1.0b1~106^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bbf1c98e868d7fca86e100e279475e0ba2aaacc;p=thirdparty%2Ftornado.git Fixed support for test generators This fixes the problem that AsyncTestCase no longer seemed to work with test generators (as supported by Nose, http://nose.readthedocs.org/en/latest/writing_tests.html#test-generators). --- diff --git a/tornado/testing.py b/tornado/testing.py index b3c47a03b..5efd8334e 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -114,8 +114,8 @@ class _TestMethodWrapper(object): def __init__(self, orig_method): self.orig_method = orig_method - def __call__(self): - result = self.orig_method() + def __call__(self, *args, **kwargs): + result = self.orig_method(*args, **kwargs) if isinstance(result, types.GeneratorType): raise TypeError("Generator test methods should be decorated with " "tornado.testing.gen_test")