assertWarns is only for python >= 3.2 (#618)

This commit is contained in:
Calen Pennington
2016-10-18 15:23:19 -04:00
committed by Guido van Rossum
parent 6e67acd8b1
commit 1db6a12ead

View File

@@ -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: ...