mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-25 23:27:38 +08:00
enable test typechecking for a bunch of django test suite folders
This commit is contained in:
1 parent
978379c454
commit
628c1224d6
24 files changed
+229
-141
No files matched your search
@@ -3,8 +3,16 @@ from .testcases import (
|
||||
TransactionTestCase as TransactionTestCase,
|
||||
SimpleTestCase as SimpleTestCase,
|
||||
LiveServerTestCase as LiveServerTestCase,
|
||||
skipIfDBFeature as skipIfDBFeature,
|
||||
skipUnlessDBFeature as skipUnlessDBFeature,
|
||||
skipUnlessAnyDBFeature as skipUnlessAnyDBFeature,
|
||||
)
|
||||
|
||||
from .utils import override_settings as override_settings, modify_settings as modify_settings
|
||||
from .utils import (
|
||||
override_settings as override_settings,
|
||||
modify_settings as modify_settings,
|
||||
override_script_prefix as override_script_prefix,
|
||||
override_system_checks as override_system_checks,
|
||||
)
|
||||
|
||||
from .client import Client as Client, RequestFactory as RequestFactory
|
||||
@@ -176,6 +176,7 @@ class CheckCondition:
|
||||
|
||||
def skipIfDBFeature(*features: Any) -> Callable: ...
|
||||
def skipUnlessDBFeature(*features: Any) -> Callable: ...
|
||||
def skipUnlessAnyDBFeature(*features: Any) -> Callable: ...
|
||||
|
||||
class QuietWSGIRequestHandler(WSGIRequestHandler):
|
||||
def log_message(*args: Any) -> None: ...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import decimal
|
||||
import warnings
|
||||
from contextlib import contextmanager
|
||||
from decimal import Decimal
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union, IO
|
||||
|
||||
from django.apps.registry import Apps
|
||||
from django.core.checks.registry import CheckRegistry
|
||||
@@ -102,3 +103,12 @@ class isolate_apps(TestContextDecorator):
|
||||
installed_apps: Tuple[str] = ...
|
||||
def __init__(self, *installed_apps: Any, **kwargs: Any) -> None: ...
|
||||
old_apps: Apps = ...
|
||||
|
||||
@contextmanager
|
||||
def extend_sys_path(*paths: str) -> Iterator[None]: ...
|
||||
@contextmanager
|
||||
def captured_output(stream_name) -> Iterator[IO[str]]: ...
|
||||
@contextmanager
|
||||
def captured_stdout() -> Iterator[IO[str]]: ...
|
||||
@contextmanager
|
||||
def captured_stderr() -> Iterator[IO[str]]: ...
|
||||
Reference in new issue
Block a user