mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Make unittest.FunctionTestCase inherit from TestCase in Python 2. (#3597)
This makes the pyi file match the implementation:
249706c1fb/Lib/unittest/case.py (L1019).
I also removed a now-redundant `run` method from FunctionTestCase
because the mypy test complained about it having a different signature
from TestCase.run().
Context:
https://github.com/python/typeshed/pull/3550#issuecomment-572702513.
This commit is contained in:
committed by
Jelle Zijlstra
parent
fe236ed8b2
commit
e0151e724a
@@ -207,12 +207,11 @@ class TestCase(Testable):
|
||||
def _formatMessage(self, msg: Optional[Text], standardMsg: Text) -> str: ... # undocumented
|
||||
def _getAssertEqualityFunc(self, first: Any, second: Any) -> Callable[..., None]: ... # undocumented
|
||||
|
||||
class FunctionTestCase(Testable):
|
||||
class FunctionTestCase(TestCase):
|
||||
def __init__(self, testFunc: Callable[[], None],
|
||||
setUp: Optional[Callable[[], None]] = ...,
|
||||
tearDown: Optional[Callable[[], None]] = ...,
|
||||
description: Optional[str] = ...) -> None: ...
|
||||
def run(self, result: TestResult) -> None: ...
|
||||
def debug(self) -> None: ...
|
||||
def countTestCases(self) -> int: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user