]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make AsyncTestCase.stop() prefer _arg over **kwargs, even when the former
authorBen Darnell <ben@bendarnell.com>
Wed, 29 Sep 2010 03:10:56 +0000 (20:10 -0700)
committerBen Darnell <ben@bendarnell.com>
Wed, 29 Sep 2010 03:10:56 +0000 (20:10 -0700)
is not truthy.

tornado/testing.py

index a18d48fd79384ddb7d066911755062cdfdd502a7..d7d81074263f7902daef48ae3bfd176cc8bb9996 100644 (file)
@@ -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