improved version

This commit is contained in:
Maxim Kurnikov
2018-07-29 20:06:41 +03:00
parent c180555415
commit 89bb6eac75
160 changed files with 1007 additions and 607 deletions

View File

@@ -37,7 +37,7 @@ def conditional_content_removal(
) -> HttpResponseBase: ...
def encode_file(boundary: str, key: str, file: Any) -> List[bytes]: ...
def encode_file(boundary: str, key: str, file: object) -> List[bytes]: ...
def encode_multipart(boundary: str, data: Dict[str, Any]) -> bytes: ...

View File

@@ -20,7 +20,7 @@ class Element:
def __init__(
self,
name: Optional[str],
attributes: Union[Tuple, List[Tuple[str, None]], List[Tuple[str, str]], List[Union[Tuple[str, str], Tuple[str, None]]]]
attributes: Union[Tuple, List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, None]], List[Tuple[str, str]]]
) -> None: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...

View File

@@ -78,12 +78,12 @@ class DiscoverRunner:
) -> None: ...
def build_suite(
self,
test_labels: Union[List[str], Tuple[str], Tuple[str, str]] = ...,
test_labels: Union[Tuple[str, str], List[str], Tuple[str]] = ...,
extra_tests: None = ...,
**kwargs
) -> TestSuite: ...
def get_resultclass(self) -> None: ...
def get_test_runner_kwargs(self) -> Dict[str, Union[None, int]]: ...
def get_test_runner_kwargs(self) -> Dict[str, Optional[int]]: ...
def run_checks(self) -> None: ...
def run_suite(self, suite: TestSuite, **kwargs) -> TextTestResult: ...
def run_tests(self, test_labels: List[str], extra_tests: List[Any] = ..., **kwargs) -> int: ...

View File

@@ -15,6 +15,6 @@ class SeleniumTestCaseBase:
def __new__(
cls: Type[SeleniumTestCaseBase],
name: str,
bases: Union[Tuple[Type[SeleniumTestCase], Type[StaticLiveServerTestCase]], Tuple[Type[AdminSeleniumTestCase]]],
bases: Union[Tuple[Type[AdminSeleniumTestCase]], Tuple[Type[SeleniumTestCase], Type[StaticLiveServerTestCase]]],
attrs: Dict[str, Union[str, List[str], Callable]]
) -> Type[AdminSeleniumTestCase]: ...

View File

@@ -23,7 +23,7 @@ from unittest.runner import TextTestResult
class CheckCondition:
def __get__(self, instance: None, cls: Any = ...) -> bool: ...
def __get__(self, instance: None, cls: Type[TestCase] = ...) -> bool: ...
def __init__(self, *conditions) -> None: ...
@@ -56,7 +56,7 @@ class SimpleTestCase:
self,
func: Callable,
cm_attr: str,
expected_exception: Any,
expected_exception: Type[Exception],
expected_message: str,
*args,
**kwargs
@@ -73,7 +73,7 @@ class SimpleTestCase:
self,
func: Callable,
cm_attr: str,
expected_exception: Any,
expected_exception: Type[Exception],
expected_message: str
) -> Iterator[Union[_AssertRaisesContext, _AssertWarnsContext]]: ...
def _assert_template_used(

View File

@@ -10,6 +10,7 @@ from django.db.backends.sqlite3.base import DatabaseWrapper
from django.template.base import Template
from django.template.context import Context
from django.test.runner import DiscoverRunner
from django.test.testcases import SimpleTestCase
from django.utils.safestring import SafeText
from typing import (
Any,
@@ -128,7 +129,10 @@ class TestContextDecorator:
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
def __init__(self, attr_name: Optional[str] = ..., kwarg_name: Optional[str] = ...) -> None: ...
def decorate_callable(self, func: Callable) -> Callable: ...
def decorate_class(self, cls: Any) -> Any: ...
def decorate_class(
self,
cls: Type[SimpleTestCase]
) -> Type[SimpleTestCase]: ...
class ignore_warnings:
@@ -146,7 +150,7 @@ class isolate_apps:
class modify_settings:
def __init__(self, *args, **kwargs) -> None: ...
def enable(self) -> None: ...
def save_options(self, test_func: Any) -> None: ...
def save_options(self, test_func: Type[SimpleTestCase]) -> None: ...
class override_script_prefix:
@@ -157,10 +161,16 @@ class override_script_prefix:
class override_settings:
def __init__(self, **kwargs) -> None: ...
def decorate_class(self, cls: Any) -> Any: ...
def decorate_class(
self,
cls: Type[Union[SimpleTestCase, LoggingCaptureMixin]]
) -> Type[Union[SimpleTestCase, LoggingCaptureMixin]]: ...
def disable(self) -> None: ...
def enable(self) -> None: ...
def save_options(self, test_func: Any) -> None: ...
def save_options(
self,
test_func: Type[Union[SimpleTestCase, LoggingCaptureMixin]]
) -> None: ...
class override_system_checks: