mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Remove Python 3.6 branches from typeshed (#8269)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import sys
|
||||
import unittest.case
|
||||
import unittest.result
|
||||
import unittest.suite
|
||||
@@ -16,10 +15,7 @@ class TestLoader:
|
||||
errors: list[type[BaseException]]
|
||||
testMethodPrefix: str
|
||||
sortTestMethodsUsing: _SortComparisonMethod
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
testNamePatterns: list[str] | None
|
||||
|
||||
testNamePatterns: list[str] | None
|
||||
suiteClass: _SuiteClass
|
||||
def loadTestsFromTestCase(self, testCaseClass: type[unittest.case.TestCase]) -> unittest.suite.TestSuite: ...
|
||||
def loadTestsFromModule(self, module: ModuleType, *args: Any, pattern: Any = ...) -> unittest.suite.TestSuite: ...
|
||||
@@ -30,19 +26,12 @@ class TestLoader:
|
||||
|
||||
defaultTestLoader: TestLoader
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def getTestCaseNames(
|
||||
testCaseClass: type[unittest.case.TestCase],
|
||||
prefix: str,
|
||||
sortUsing: _SortComparisonMethod = ...,
|
||||
testNamePatterns: list[str] | None = ...,
|
||||
) -> Sequence[str]: ...
|
||||
|
||||
else:
|
||||
def getTestCaseNames(
|
||||
testCaseClass: type[unittest.case.TestCase], prefix: str, sortUsing: _SortComparisonMethod = ...
|
||||
) -> Sequence[str]: ...
|
||||
|
||||
def getTestCaseNames(
|
||||
testCaseClass: type[unittest.case.TestCase],
|
||||
prefix: str,
|
||||
sortUsing: _SortComparisonMethod = ...,
|
||||
testNamePatterns: list[str] | None = ...,
|
||||
) -> Sequence[str]: ...
|
||||
def makeSuite(
|
||||
testCaseClass: type[unittest.case.TestCase],
|
||||
prefix: str = ...,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import sys
|
||||
import unittest.case
|
||||
import unittest.loader
|
||||
import unittest.result
|
||||
@@ -23,9 +22,7 @@ class TestProgram:
|
||||
buffer: bool | None
|
||||
progName: str | None
|
||||
warnings: str | None
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
testNamePatterns: list[str] | None
|
||||
testNamePatterns: list[str] | None
|
||||
def __init__(
|
||||
self,
|
||||
module: None | str | ModuleType = ...,
|
||||
@@ -44,11 +41,7 @@ class TestProgram:
|
||||
) -> None: ...
|
||||
def usageExit(self, msg: Any = ...) -> None: ...
|
||||
def parseArgs(self, argv: list[str]) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def createTests(self, from_discovery: bool = ..., Loader: unittest.loader.TestLoader | None = ...) -> None: ...
|
||||
else:
|
||||
def createTests(self) -> None: ...
|
||||
|
||||
def createTests(self, from_discovery: bool = ..., Loader: unittest.loader.TestLoader | None = ...) -> None: ...
|
||||
def runTests(self) -> None: ... # undocumented
|
||||
|
||||
main = TestProgram
|
||||
|
||||
@@ -28,7 +28,7 @@ if sys.version_info >= (3, 8):
|
||||
"PropertyMock",
|
||||
"seal",
|
||||
)
|
||||
elif sys.version_info >= (3, 7):
|
||||
else:
|
||||
__all__ = (
|
||||
"Mock",
|
||||
"MagicMock",
|
||||
@@ -45,22 +45,7 @@ elif sys.version_info >= (3, 7):
|
||||
"PropertyMock",
|
||||
"seal",
|
||||
)
|
||||
else:
|
||||
__all__ = (
|
||||
"Mock",
|
||||
"MagicMock",
|
||||
"patch",
|
||||
"sentinel",
|
||||
"DEFAULT",
|
||||
"ANY",
|
||||
"call",
|
||||
"create_autospec",
|
||||
"FILTER_DIR",
|
||||
"NonCallableMock",
|
||||
"NonCallableMagicMock",
|
||||
"mock_open",
|
||||
"PropertyMock",
|
||||
)
|
||||
|
||||
__version__: str
|
||||
|
||||
FILTER_DIR: Any
|
||||
@@ -155,10 +140,8 @@ class NonCallableMock(Base, Any):
|
||||
def assert_called_once(_mock_self) -> None: ...
|
||||
|
||||
def reset_mock(self, visited: Any = ..., *, return_value: bool = ..., side_effect: bool = ...) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def _extract_mock_name(self) -> str: ...
|
||||
def _get_call_signature_from_name(self, name: str) -> Any: ...
|
||||
|
||||
def _extract_mock_name(self) -> str: ...
|
||||
def _get_call_signature_from_name(self, name: str) -> Any: ...
|
||||
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
|
||||
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
|
||||
@@ -446,5 +429,4 @@ class PropertyMock(Mock):
|
||||
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def seal(mock: Any) -> None: ...
|
||||
def seal(mock: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user