mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
adding type-specific assertEqual cases (#315)
Adding support for type-specific equality methods (see https://docs.python.org/2.7/library/unittest.html?highlight=assertlistequals#unittest.TestCase.addTypeEqualityFunc) in the unittest stub for both 2.7/3. As requested by @gvanrossum in #308
This commit is contained in:
committed by
Guido van Rossum
parent
03326014a5
commit
4a79dec6ba
@@ -73,9 +73,6 @@ class TestCase(Testable):
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertSequenceEqual(self, first: Sequence[Any], second: Sequence[Any],
|
||||
msg: object = ...,
|
||||
seq_type: type = ...) -> None: ...
|
||||
def failIfEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
@@ -92,9 +89,20 @@ class TestCase(Testable):
|
||||
def assertGreater(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertGreaterEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
msg: object = ...) -> None: ...
|
||||
def assertMultiLineEqual(self, first: str, second: str,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertSequenceEqual(self, first: Sequence[Any], second: Sequence[Any],
|
||||
msg: object = ...,
|
||||
seq_type: type = ...) -> None: ...
|
||||
def assertListEqual(self, first: List[Any], second: List[Any],
|
||||
msg: object = ...) -> None: ...
|
||||
msg: object = ...) -> None: ...
|
||||
def assertTupleEqual(self, first: Tuple[Any, ...], second: Tuple[Any, ...],
|
||||
msg: object = ...) -> None: ...
|
||||
def assertSetEqual(self, first: Set[Any], second: Set[Any],
|
||||
msg: object = ...) -> None: ...
|
||||
def assertDictEqual(self, first: Dict[Any, Any], second: Dict[Any, Any],
|
||||
msg: object = ...) -> None: ...
|
||||
def assertLess(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertLessEqual(self, first: Any, second: Any,
|
||||
|
||||
Reference in New Issue
Block a user