mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
clean up unittest.py (#509)
* clean up unittest.py Remove duplicates, adjust wrapping. * also remove unittest from pytype blacklist
This commit is contained in:
@@ -69,23 +69,33 @@ class TestCase(Testable):
|
||||
def assertTrue(self, expr: Any, msg: object = ...) -> None: ...
|
||||
def assertEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertEquals(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def failUnlessEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotEquals(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def failIfEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...,
|
||||
delta: float = ...) -> None: ...
|
||||
def failUnlessAlmostEqual(self, first: float, second: float,
|
||||
places: int = ...,
|
||||
def assertAlmostEquals(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...,
|
||||
delta: float = ...) -> None: ...
|
||||
def failUnlessAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertNotAlmostEqual(self, first: float, second: float,
|
||||
places: int = ..., msg: object = ...,
|
||||
def assertNotAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...,
|
||||
delta: float = ...) -> None: ...
|
||||
def assertNotAlmostEquals(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...,
|
||||
delta: float = ...) -> None: ...
|
||||
def failIfAlmostEqual(self, first: float, second: float, places: int = ...,
|
||||
msg: object = ...) -> None: ...
|
||||
msg: object = ...,
|
||||
delta: float = ...) -> None: ...
|
||||
def assertGreater(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertGreaterEqual(self, first: Any, second: Any,
|
||||
@@ -93,8 +103,7 @@ class TestCase(Testable):
|
||||
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: ...
|
||||
msg: object = ..., seq_type: type = ...) -> None: ...
|
||||
def assertListEqual(self, first: List[Any], second: List[Any],
|
||||
msg: object = ...) -> None: ...
|
||||
def assertTupleEqual(self, first: Tuple[Any, ...], second: Tuple[Any, ...],
|
||||
@@ -108,6 +117,7 @@ class TestCase(Testable):
|
||||
def assertLessEqual(self, first: Any, second: Any,
|
||||
msg: object = ...) -> None: ...
|
||||
def assertRaises(self, expected_exception: type, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def failUnlessRaises(self, expected_exception: type, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def failIf(self, expr: Any, msg: object = ...) -> None: ...
|
||||
def assertFalse(self, expr: Any, msg: object = ...) -> None: ...
|
||||
def assertIs(self, first: object, second: object,
|
||||
@@ -134,20 +144,6 @@ class TestCase(Testable):
|
||||
def addCleanup(function: Any, *args: Any, **kwargs: Any) -> None: ...
|
||||
def skipTest(self, reason: Any) -> None: ...
|
||||
|
||||
assertEquals = assertEqual
|
||||
assertNotEquals = assertNotEqual
|
||||
assertAlmostEquals = assertAlmostEqual
|
||||
assertNotAlmostEquals = assertNotAlmostEqual
|
||||
assert_ = assertTrue
|
||||
|
||||
failUnlessEqual = assertEqual
|
||||
failIfEqual = assertNotEqual
|
||||
failUnlessAlmostEqual = assertAlmostEqual
|
||||
failIfAlmostEqual = assertNotAlmostEqual
|
||||
failUnless = assertTrue
|
||||
failUnlessRaises = assertRaises
|
||||
failIf = assertFalse
|
||||
|
||||
class CallableTestCase(Testable):
|
||||
def __init__(self, testFunc: Callable[[], None],
|
||||
setUp: Callable[[], None] = ...,
|
||||
|
||||
Reference in New Issue
Block a user