Bump unittest to 3.14 (#14012)

This commit is contained in:
Semyon Moroz
2025-05-11 12:40:17 +00:00
committed by GitHub
parent 9ce2a25b91
commit a92579c0b0
2 changed files with 11 additions and 16 deletions
+11
View File
@@ -18,6 +18,7 @@ _T = TypeVar("_T")
_S = TypeVar("_S", bound=SupportsSub[Any, Any])
_E = TypeVar("_E", bound=BaseException)
_FT = TypeVar("_FT", bound=Callable[..., Any])
_SB = TypeVar("_SB", str, bytes, bytearray)
_P = ParamSpec("_P")
DIFF_OMITTED: Final[str]
@@ -289,6 +290,16 @@ class TestCase:
# Runtime has *args, **kwargs, but will error if any are supplied
def __init_subclass__(cls, *args: Never, **kwargs: Never) -> None: ...
if sys.version_info >= (3, 14):
def assertIsSubclass(self, cls: type, superclass: type | tuple[type, ...], msg: Any = None) -> None: ...
def assertNotIsSubclass(self, cls: type, superclass: type | tuple[type, ...], msg: Any = None) -> None: ...
def assertHasAttr(self, obj: object, name: str, msg: Any = None) -> None: ...
def assertNotHasAttr(self, obj: object, name: str, msg: Any = None) -> None: ...
def assertStartsWith(self, s: _SB, prefix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ...
def assertNotStartsWith(self, s: _SB, prefix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ...
def assertEndsWith(self, s: _SB, suffix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ...
def assertNotEndsWith(self, s: _SB, suffix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ...
class FunctionTestCase(TestCase):
def __init__(
self,