From c1dbdc7e26556fb71d81c312c83fab0bc044fbc2 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Fri, 16 Nov 2018 01:32:42 -0800 Subject: [PATCH] Fix the return type for unittest.TestCase.run() (#2603) In Python 3 this method returns None if the test is skipped, and a TestResult otherwise. --- stdlib/3/unittest/__init__.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3/unittest/__init__.pyi b/stdlib/3/unittest/__init__.pyi index 8f092994b..664948f6e 100644 --- a/stdlib/3/unittest/__init__.pyi +++ b/stdlib/3/unittest/__init__.pyi @@ -37,7 +37,7 @@ class TestCase: def setUpClass(cls) -> None: ... @classmethod def tearDownClass(cls) -> None: ... - def run(self, result: Optional[TestResult] = ...) -> TestCase: ... + def run(self, result: Optional[TestResult] = ...) -> Optional[TestResult]: ... def skipTest(self, reason: Any) -> None: ... def subTest(self, msg: Any = ..., **params: Any) -> ContextManager[None]: ... def debug(self) -> None: ...