massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / humanfriendly / humanfriendly / testing.pyi
1 import unittest
2 from typing import Any
3
4 from humanfriendly.compat import StringIO
5
6 def configure_logging(log_level=...) -> None: ...
7 def make_dirs(pathname) -> None: ...
8 def retry(func, timeout: int = ..., exc_type=...): ...
9 def run_cli(entry_point, *arguments, **options): ...
10 def skip_on_raise(*exc_types): ...
11 def touch(filename) -> None: ...
12
13 class CallableTimedOut(Exception): ...
14
15 class ContextManager:
16     def __enter__(self): ...
17     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
18
19 class PatchedAttribute(ContextManager):
20     object_to_patch: Any
21     attribute_to_patch: Any
22     patched_value: Any
23     original_value: Any
24     def __init__(self, obj, name, value) -> None: ...
25     def __enter__(self): ...
26     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
27
28 class PatchedItem(ContextManager):
29     object_to_patch: Any
30     item_to_patch: Any
31     patched_value: Any
32     original_value: Any
33     def __init__(self, obj, item, value) -> None: ...
34     def __enter__(self): ...
35     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
36
37 class TemporaryDirectory(ContextManager):
38     mkdtemp_options: Any
39     temporary_directory: Any
40     def __init__(self, **options) -> None: ...
41     def __enter__(self): ...
42     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
43
44 class MockedHomeDirectory(PatchedItem, TemporaryDirectory):
45     def __init__(self) -> None: ...
46     patched_value: Any
47     def __enter__(self): ...
48     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
49
50 class CustomSearchPath(PatchedItem, TemporaryDirectory):
51     isolated_search_path: Any
52     def __init__(self, isolated: bool = ...) -> None: ...
53     patched_value: Any
54     def __enter__(self): ...
55     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
56     @property
57     def current_search_path(self): ...
58
59 class MockedProgram(CustomSearchPath):
60     program_name: Any
61     program_returncode: Any
62     program_script: Any
63     program_signal_file: Any
64     def __init__(self, name, returncode: int = ..., script: Any | None = ...) -> None: ...
65     def __enter__(self): ...
66     def __exit__(self, *args, **kw): ...
67
68 class CaptureOutput(ContextManager):
69     stdin: Any
70     stdout: Any
71     stderr: Any
72     patched_attributes: Any
73     def __init__(self, merged: bool = ..., input: str = ..., enabled: bool = ...) -> None: ...
74     def __enter__(self): ...
75     def __exit__(self, exc_type: Any | None = ..., exc_value: Any | None = ..., traceback: Any | None = ...) -> None: ...
76     def get_lines(self): ...
77     def get_text(self): ...
78     def getvalue(self): ...
79
80 class CaptureBuffer(StringIO):
81     def get_lines(self): ...
82     def get_text(self): ...
83
84 class TestCase(unittest.TestCase):
85     def __init__(self, *args, **kw) -> None: ...
86     def setUp(self, log_level=...) -> None: ...