Clean up several version-dependent modules (#6885)

This commit is contained in:
Alex Waygood
2022-01-10 13:57:08 +00:00
committed by GitHub
parent a8c9c194b4
commit 7d33ff330a
11 changed files with 142 additions and 148 deletions

View File

@@ -1,5 +1,4 @@
import sys
from unittest.async_case import *
from .case import (
FunctionTestCase as FunctionTestCase,
@@ -29,6 +28,8 @@ from .signals import (
from .suite import BaseTestSuite as BaseTestSuite, TestSuite as TestSuite
if sys.version_info >= (3, 8):
from unittest.async_case import *
from .case import addModuleCleanup as addModuleCleanup
def load_tests(loader: TestLoader, tests: TestSuite, pattern: str | None) -> TestSuite: ...

View File

@@ -1,10 +1,8 @@
import sys
from typing import Any, Awaitable, Callable
from .case import TestCase
if sys.version_info >= (3, 8):
class IsolatedAsyncioTestCase(TestCase):
async def asyncSetUp(self) -> None: ...
async def asyncTearDown(self) -> None: ...
def addAsyncCleanup(self, __func: Callable[..., Awaitable[Any]], *args: Any, **kwargs: Any) -> None: ...
class IsolatedAsyncioTestCase(TestCase):
async def asyncSetUp(self) -> None: ...
async def asyncTearDown(self) -> None: ...
def addAsyncCleanup(self, __func: Callable[..., Awaitable[Any]], *args: Any, **kwargs: Any) -> None: ...