From: Ben Darnell Date: Wed, 29 Sep 2010 03:10:56 +0000 (-0700) Subject: Make AsyncTestCase.stop() prefer _arg over **kwargs, even when the former X-Git-Tag: v1.2.0~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e210a644aa982bd6502726a900c79ebdcbe8fdc2;p=thirdparty%2Ftornado.git Make AsyncTestCase.stop() prefer _arg over **kwargs, even when the former is not truthy. --- diff --git a/tornado/testing.py b/tornado/testing.py index a18d48fd7..d7d810742 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -139,7 +139,8 @@ class AsyncTestCase(unittest.TestCase): Keyword arguments or a single positional argument passed to stop() are saved and will be returned by wait(). ''' - self.__stop_args = _arg or kwargs + assert _arg is None or not kwargs + self.__stop_args = kwargs or _arg if self.__running: self.io_loop.stop() self.__running = False