mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Fix assertAlmostEqual regression on mixed numeric types (#8137)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
import sys
|
||||
import unittest.result
|
||||
from _typeshed import Self, SupportsDunderGE, SupportsDunderGT, SupportsDunderLE, SupportsDunderLT, SupportsSub
|
||||
from _typeshed import Self, SupportsDunderGE, SupportsDunderGT, SupportsDunderLE, SupportsDunderLT, SupportsRSub, SupportsSub
|
||||
from collections.abc import Callable, Container, Iterable, Mapping, Sequence, Set as AbstractSet
|
||||
from contextlib import AbstractContextManager
|
||||
from types import TracebackType
|
||||
@@ -217,6 +217,15 @@ class TestCase:
|
||||
delta: None = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def assertAlmostEqual(
|
||||
self,
|
||||
first: _T,
|
||||
second: SupportsRSub[_T, SupportsAbs[SupportsRound[object]]],
|
||||
places: int | None = ...,
|
||||
msg: Any = ...,
|
||||
delta: None = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def assertNotAlmostEqual(self, first: _S, second: _S, places: None, msg: Any, delta: _SupportsAbsAndDunderGE) -> None: ...
|
||||
@overload
|
||||
def assertNotAlmostEqual(
|
||||
@@ -231,6 +240,15 @@ class TestCase:
|
||||
msg: Any = ...,
|
||||
delta: None = ...,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def assertNotAlmostEqual(
|
||||
self,
|
||||
first: _T,
|
||||
second: SupportsRSub[_T, SupportsAbs[SupportsRound[object]]],
|
||||
places: int | None = ...,
|
||||
msg: Any = ...,
|
||||
delta: None = ...,
|
||||
) -> None: ...
|
||||
def assertRegex(self, text: AnyStr, expected_regex: AnyStr | Pattern[AnyStr], msg: Any = ...) -> None: ...
|
||||
def assertNotRegex(self, text: AnyStr, unexpected_regex: AnyStr | Pattern[AnyStr], msg: Any = ...) -> None: ...
|
||||
def assertCountEqual(self, first: Iterable[Any], second: Iterable[Any], msg: Any = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user