From e210a644aa982bd6502726a900c79ebdcbe8fdc2 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Tue, 28 Sep 2010 20:10:56 -0700 Subject: [PATCH] Make AsyncTestCase.stop() prefer _arg over **kwargs, even when the former is not truthy. --- tornado/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3