mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 09:55:59 +08:00
Drop Python 3.3 support from several stubs (#2266)
* Drop Python 3.3 support from importlib stubs * Drop Python 3.3 support from html and symbol stubs
This commit is contained in:
committed by
Jelle Zijlstra
parent
1184726417
commit
b05e99297c
@@ -37,8 +37,7 @@ class TestCase:
|
||||
def tearDownClass(cls) -> None: ...
|
||||
def run(self, result: Optional[TestResult] = ...) -> TestCase: ...
|
||||
def skipTest(self, reason: Any) -> None: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def subTest(self, msg: Any = ..., **params: Any) -> ContextManager[None]: ...
|
||||
def subTest(self, msg: Any = ..., **params: Any) -> ContextManager[None]: ...
|
||||
def debug(self) -> None: ...
|
||||
def assertEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ...
|
||||
def assertNotEqual(self, first: Any, second: Any,
|
||||
@@ -103,11 +102,10 @@ class TestCase:
|
||||
def assertWarnsRegex(self,
|
||||
exception: Union[Type[Warning], Tuple[Type[Warning], ...]],
|
||||
msg: Any = ...) -> _AssertWarnsContext: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def assertLogs(
|
||||
self, logger: Optional[logging.Logger] = ...,
|
||||
level: Union[int, str, None] = ...
|
||||
) -> _AssertLogsContext: ...
|
||||
def assertLogs(
|
||||
self, logger: Optional[logging.Logger] = ...,
|
||||
level: Union[int, str, None] = ...
|
||||
) -> _AssertLogsContext: ...
|
||||
def assertAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
msg: Any = ..., delta: float = ...) -> None: ...
|
||||
def assertNotAlmostEqual(self, first: float, second: float,
|
||||
@@ -273,9 +271,8 @@ class TestResult:
|
||||
def addExpectedFailure(self, test: TestCase,
|
||||
err: _SysExcInfoType) -> None: ...
|
||||
def addUnexpectedSuccess(self, test: TestCase) -> None: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def addSubTest(self, test: TestCase, subtest: TestCase,
|
||||
outcome: Optional[_SysExcInfoType]) -> None: ...
|
||||
def addSubTest(self, test: TestCase, subtest: TestCase,
|
||||
outcome: Optional[_SysExcInfoType]) -> None: ...
|
||||
|
||||
class TextTestResult(TestResult):
|
||||
def __init__(self, stream: TextIO, descriptions: bool,
|
||||
@@ -306,16 +303,12 @@ class TextTestRunner(TestRunner):
|
||||
warnings: Optional[Type[Warning]] = ...) -> None: ...
|
||||
def _makeResult(self) -> TestResult: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
_DefaultTestType = Union[str, Iterable[str], None]
|
||||
else:
|
||||
_DefaultTestType = Union[str, None]
|
||||
|
||||
# not really documented
|
||||
class TestProgram:
|
||||
result = ... # type: TestResult
|
||||
|
||||
def main(module: str = ..., defaultTest: _DefaultTestType = ...,
|
||||
def main(module: str = ...,
|
||||
defaultTest: Union[str, Iterable[str], None] = ...,
|
||||
argv: Optional[List[str]] = ...,
|
||||
testRunner: Union[Type[TestRunner], TestRunner, None] = ...,
|
||||
testLoader: TestLoader = ..., exit: bool = ..., verbosity: int = ...,
|
||||
|
||||
Reference in New Issue
Block a user