mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
Improve type of tornado.testing.gen_test. (#3174)
gen_test can accept a timeout parameter. See https://www.tornadoweb.org/en/branch5.1/testing.html#tornado.testing.gen_test.
This commit is contained in:
committed by
Jelle Zijlstra
parent
628eee29f7
commit
0dc3bf941a
10
third_party/2/tornado/testing.pyi
vendored
10
third_party/2/tornado/testing.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Callable, Generator, Optional, overload
|
||||
import unittest
|
||||
import logging
|
||||
|
||||
@@ -42,7 +42,13 @@ class AsyncHTTPSTestCase(AsyncHTTPTestCase):
|
||||
def get_ssl_options(self): ...
|
||||
def get_protocol(self): ...
|
||||
|
||||
def gen_test(f): ...
|
||||
@overload
|
||||
def gen_test(*, timeout: Optional[float] = ...) -> Callable[[Callable[..., Generator]], Callable[..., None]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def gen_test(func: Callable[..., Generator]) -> Callable[..., None]:
|
||||
...
|
||||
|
||||
class LogTrapTestCase(unittest.TestCase):
|
||||
def run(self, result: Optional[Any] = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user