Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-10-16 23:07:43 +07:00
parent 13447cc7f6
commit a099703e99

View File

@@ -1,17 +1,36 @@
import unittest import unittest
from typing import Any from collections import defaultdict
from logging import Logger
from re import Pattern
from typing import Any, Generator, NamedTuple
stats_logger: Logger
class Stat(NamedTuple):
time: float
queries: int
def __add__(self, other: Stat) -> Stat: ...
_TEST_ID: Pattern
class OdooTestResult(unittest.result.TestResult): class OdooTestResult(unittest.result.TestResult):
time_start: float | None time_start: float | None
queries_start: int | None queries_start: int | None
_soft_fail: bool
had_failure: bool
stats: defaultdict[Any, Stat]
def __init__(self) -> None: ... def __init__(self) -> None: ...
def __str__(self) -> str: ... def __str__(self) -> str: ...
def soft_fail(self) -> Generator[None, None, None]: ...
shouldStop: Any shouldStop: Any
def update(self, other) -> None: ... def update(self, other) -> None: ...
def log(self, level, msg, *args, test: Any | None = ..., exc_info: Any | None = ..., extra: Any | None = ..., def log(self, level, msg, *args, test: Any | None = ..., exc_info: Any | None = ..., extra: Any | None = ...,
stack_info: bool = ..., caller_infos: Any | None = ...) -> None: ... stack_info: bool = ..., caller_infos: Any | None = ...) -> None: ...
def log_stats(self) -> None: ...
def getDescription(self, test): ... def getDescription(self, test): ...
def startTest(self, test) -> None: ... def startTest(self, test) -> None: ...
def stopTest(self, test) -> None: ...
def collectStats(self, test_id) -> Generator[None, None, None]: ...
def addError(self, test, err) -> None: ... def addError(self, test, err) -> None: ...
def addFailure(self, test, err) -> None: ... def addFailure(self, test, err) -> None: ...
def addSubTest(self, test, subtest, err) -> None: ... def addSubTest(self, test, subtest, err) -> None: ...