massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / doctest.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/doctest.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/doctest.pyi
new file mode 100644 (file)
index 0000000..dbabd36
--- /dev/null
@@ -0,0 +1,161 @@
+from typing import Any, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, Union\r
+\r
+import sys\r
+import types\r
+import unittest\r
+\r
+TestResults = NamedTuple('TestResults', [\r
+    ('failed', int),\r
+    ('attempted', int),\r
+])\r
+\r
+OPTIONFLAGS_BY_NAME: Dict[str, int]\r
+def register_optionflag(name: str) -> int: ...\r
+DONT_ACCEPT_TRUE_FOR_1: int\r
+DONT_ACCEPT_BLANKLINE: int\r
+NORMALIZE_WHITESPACE: int\r
+ELLIPSIS: int\r
+SKIP: int\r
+IGNORE_EXCEPTION_DETAIL: int\r
+\r
+COMPARISON_FLAGS: int\r
+\r
+REPORT_UDIFF: int\r
+REPORT_CDIFF: int\r
+REPORT_NDIFF: int\r
+REPORT_ONLY_FIRST_FAILURE: int\r
+if sys.version_info >= (3, 4):\r
+    FAIL_FAST: int\r
+\r
+REPORTING_FLAGS: int\r
+\r
+BLANKLINE_MARKER: str\r
+ELLIPSIS_MARKER: str\r
+\r
+class Example:\r
+    source: str\r
+    want: str\r
+    exc_msg: Optional[str]\r
+    lineno: int\r
+    indent: int\r
+    options: Dict[int, bool]\r
+    def __init__(self, source: str, want: str, exc_msg: Optional[str] = ..., lineno: int = ..., indent: int = ...,\r
+                 options: Optional[Dict[int, bool]] = ...) -> None: ...\r
+    def __hash__(self) -> int: ...\r
+\r
+class DocTest:\r
+    examples: List[Example]\r
+    globs: Dict[str, Any]\r
+    name: str\r
+    filename: Optional[str]\r
+    lineno: Optional[int]\r
+    docstring: Optional[str]\r
+    def __init__(self, examples: List[Example], globs: Dict[str, Any], name: str, filename: Optional[str], lineno: Optional[int], docstring: Optional[str]) -> None: ...\r
+    def __hash__(self) -> int: ...\r
+    def __lt__(self, other: DocTest) -> bool: ...\r
+\r
+class DocTestParser:\r
+    def parse(self, string: str, name: str = ...) -> List[Union[str, Example]]: ...\r
+    def get_doctest(self, string: str, globs: Dict[str, Any], name: str, filename: Optional[str], lineno: Optional[str]) -> DocTest: ...\r
+    def get_examples(self, strin: str, name: str = ...) -> List[Example]: ...\r
+\r
+class DocTestFinder:\r
+    def __init__(self, verbose: bool = ..., parser: DocTestParser = ...,\r
+                 recurse: bool = ..., exclude_empty: bool = ...) -> None: ...\r
+    def find(self, obj: object, name: Optional[str] = ..., module: Union[None, bool, types.ModuleType] = ...,\r
+             globs: Optional[Dict[str, Any]] = ..., extraglobs: Optional[Dict[str, Any]] = ...) -> List[DocTest]: ...\r
+\r
+_Out = Callable[[str], Any]\r
+_ExcInfo = Tuple[Type[BaseException], BaseException, types.TracebackType]\r
+\r
+class DocTestRunner:\r
+    DIVIDER: str\r
+    optionflags: int\r
+    original_optionflags: int\r
+    tries: int\r
+    failures: int\r
+    test: DocTest\r
+\r
+    def __init__(self, checker: Optional[OutputChecker] = ..., verbose: Optional[bool] = ..., optionflags: int = ...) -> None: ...\r
+    def report_start(self, out: _Out, test: DocTest, example: Example) -> None: ...\r
+    def report_success(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ...\r
+    def report_failure(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ...\r
+    def report_unexpected_exception(self, out: _Out, test: DocTest, example: Example, exc_info: _ExcInfo) -> None: ...\r
+    def run(self, test: DocTest, compileflags: Optional[int] = ..., out: Optional[_Out] = ..., clear_globs: bool = ...) -> TestResults: ...\r
+    def summarize(self, verbose: Optional[bool] = ...) -> TestResults: ...\r
+    def merge(self, other: DocTestRunner) -> None: ...\r
+\r
+class OutputChecker:\r
+    def check_output(self, want: str, got: str, optionflags: int) -> bool: ...\r
+    def output_difference(self, example: Example, got: str, optionflags: int) -> str: ...\r
+\r
+class DocTestFailure(Exception):\r
+    test: DocTest\r
+    example: Example\r
+    got: str\r
+\r
+    def __init__(self, test: DocTest, example: Example, got: str) -> None: ...\r
+\r
+class UnexpectedException(Exception):\r
+    test: DocTest\r
+    example: Example\r
+    exc_info: _ExcInfo\r
+\r
+    def __init__(self, test: DocTest, example: Example, exc_info: _ExcInfo) -> None: ...\r
+\r
+class DebugRunner(DocTestRunner): ...\r
+\r
+master: Optional[DocTestRunner]\r
+\r
+def testmod(m: Optional[types.ModuleType] = ..., name: Optional[str] = ..., globs: Dict[str, Any] = ..., verbose: Optional[bool] = ...,\r
+            report: bool = ..., optionflags: int = ..., extraglobs: Dict[str, Any] = ...,\r
+            raise_on_error: bool = ..., exclude_empty: bool = ...) -> TestResults: ...\r
+def testfile(filename: str, module_relative: bool = ..., name: Optional[str] = ..., package: Union[None, str, types.ModuleType] = ...,\r
+             globs: Optional[Dict[str, Any]] = ..., verbose: Optional[bool] = ..., report: bool = ..., optionflags: int = ...,\r
+             extraglobs: Optional[Dict[str, Any]] = ..., raise_on_error: bool = ..., parser: DocTestParser = ...,\r
+             encoding: Optional[str] = ...) -> TestResults: ...\r
+def run_docstring_examples(f: object, globs: Dict[str, Any], verbose: bool = ..., name: str = ...,\r
+                           compileflags: Optional[int] = ..., optionflags: int = ...) -> None: ...\r
+def set_unittest_reportflags(flags: int) -> int: ...\r
+\r
+class DocTestCase(unittest.TestCase):\r
+    def __init__(self, test: DocTest, optionflags: int = ..., setUp: Optional[Callable[[DocTest], Any]] = ...,\r
+                 tearDown: Optional[Callable[[DocTest], Any]] = ...,\r
+                 checker: Optional[OutputChecker] = ...) -> None: ...\r
+    def setUp(self) -> None: ...\r
+    def tearDown(self) -> None: ...\r
+    def runTest(self) -> None: ...\r
+    def format_failure(self, err: str) -> str: ...\r
+    def debug(self) -> None: ...\r
+    def id(self) -> str: ...\r
+    def __hash__(self) -> int: ...\r
+    def shortDescription(self) -> str: ...\r
+\r
+class SkipDocTestCase(DocTestCase):\r
+    def __init__(self, module: types.ModuleType) -> None: ...\r
+    def setUp(self) -> None: ...\r
+    def test_skip(self) -> None: ...\r
+    def shortDescription(self) -> str: ...\r
+\r
+if sys.version_info >= (3, 4):\r
+    class _DocTestSuite(unittest.TestSuite): ...\r
+else:\r
+    _DocTestSuite = unittest.TestSuite\r
+\r
+def DocTestSuite(module: Union[None, str, types.ModuleType] = ..., globs: Optional[Dict[str, Any]] = ...,\r
+                 extraglobs: Optional[Dict[str, Any]] = ..., test_finder: Optional[DocTestFinder] = ...,\r
+                 **options: Any) -> _DocTestSuite: ...\r
+\r
+class DocFileCase(DocTestCase):\r
+    def id(self) -> str: ...\r
+    def format_failure(self, err: str) -> str: ...\r
+\r
+def DocFileTest(path: str, module_relative: bool = ..., package: Union[None, str, types.ModuleType] = ...,\r
+                globs: Optional[Dict[str, Any]] = ..., parser: DocTestParser = ...,\r
+                encoding: Optional[str] = ..., **options: Any) -> DocFileCase: ...\r
+def DocFileSuite(*paths: str, **kw: Any) -> _DocTestSuite: ...\r
+def script_from_examples(s: str) -> str: ...\r
+def testsource(module: Union[None, str, types.ModuleType], name: str) -> str: ...\r
+def debug_src(src: str, pm: bool = ..., globs: Optional[Dict[str, Any]] = ...) -> None: ...\r
+def debug_script(src: str, pm: bool = ..., globs: Optional[Dict[str, Any]] = ...) -> None: ...\r
+def debug(module: Union[None, str, types.ModuleType], name: str, pm: bool = ...) -> None: ...\r