Skip to content

Commit 628d684

Browse files
committed
Add misc types for mock and unittest.mock
1 parent 19eade5 commit 628d684

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

stdlib/3/unittest/mock.pyi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
55

66
_T = TypeVar("_T")
77

8+
__all__: Tuple[str, ...] = (
9+
'Mock',
10+
'MagicMock',
11+
'patch',
12+
'sentinel',
13+
'DEFAULT',
14+
'ANY',
15+
'call',
16+
'create_autospec',
17+
'AsyncMock',
18+
'FILTER_DIR',
19+
'NonCallableMock',
20+
'NonCallableMagicMock',
21+
'mock_open',
22+
'PropertyMock',
23+
'seal',
24+
)
25+
__version__: str
26+
827
FILTER_DIR: Any
928

1029
class _slotted: ...

tests/stubtest_whitelists/py38.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ types.WrapperDescriptorType.__get__
151151
unittest.TestCase.addCleanup
152152
unittest.case.TestCase.addCleanup
153153
unittest.doModuleCleanups
154-
unittest.mock.MagicProxy.__call__
155-
unittest.mock._MockIter.__iter__
156154
weakref.WeakValueDictionary.__init__
157155
weakref.WeakValueDictionary.update
158156
weakref.getweakrefcount

third_party/2and3/mock.pyi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
55

66
_T = TypeVar("_T")
77

8+
__all__: Tuple[str, ...] = (
9+
'Mock',
10+
'MagicMock',
11+
'patch',
12+
'sentinel',
13+
'DEFAULT',
14+
'ANY',
15+
'call',
16+
'create_autospec',
17+
'AsyncMock',
18+
'FILTER_DIR',
19+
'NonCallableMock',
20+
'NonCallableMagicMock',
21+
'mock_open',
22+
'PropertyMock',
23+
'seal',
24+
)
25+
__version__: str
26+
827
FILTER_DIR: Any
928

1029
class _slotted: ...

0 commit comments

Comments
 (0)