mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
assertWarns is only for python >= 3.2 (#618)
This commit is contained in:
committed by
Guido van Rossum
parent
6e67acd8b1
commit
1db6a12ead
@@ -50,13 +50,6 @@ class _AssertRaisesContext(_AssertRaisesBaseContext):
|
||||
def __enter__(self) -> _AssertRaisesContext: ...
|
||||
def __exit__(self, exc_type, exc_value, tb) -> bool: ...
|
||||
|
||||
class _AssertWarnsContext(_AssertRaisesBaseContext):
|
||||
warning = ... # type: Any # TODO precise type
|
||||
filename = ... # type: str
|
||||
lineno = 0
|
||||
def __enter__(self) -> _AssertWarnsContext: ...
|
||||
def __exit__(self, exc_type, exc_value, tb) -> bool: ...
|
||||
|
||||
class TestCase(Testable):
|
||||
def __init__(self, methodName: str = ...) -> None: ...
|
||||
# TODO failureException
|
||||
@@ -134,8 +127,6 @@ class TestCase(Testable):
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotIsInstance(self, obj: Any, cls: type,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertWarns(self, expected_warning: type, callable_obj: Any = ...,
|
||||
*args: Any, **kwargs: Any) -> _AssertWarnsContext: ...
|
||||
def fail(self, msg: object = ...) -> None: ...
|
||||
def countTestCases(self) -> int: ...
|
||||
def defaultTestResult(self) -> TestResult: ...
|
||||
|
||||
Reference in New Issue
Block a user