Skip to content

Commit

Permalink
Add misc types for mock and unittest.mock (#3923)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxr authored Apr 24, 2020
1 parent 92f52a2 commit 31705fc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
19 changes: 19 additions & 0 deletions stdlib/3/unittest/mock.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ from typing import Any, List, Optional, Text, Tuple, Type, TypeVar

_T = TypeVar("_T")

__all__ = [
'Mock',
'MagicMock',
'patch',
'sentinel',
'DEFAULT',
'ANY',
'call',
'create_autospec',
'AsyncMock',
'FILTER_DIR',
'NonCallableMock',
'NonCallableMagicMock',
'mock_open',
'PropertyMock',
'seal',
]
__version__: str

FILTER_DIR: Any

class _slotted: ...
Expand Down
2 changes: 0 additions & 2 deletions tests/stubtest_whitelists/py38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ types.WrapperDescriptorType.__get__
unittest.TestCase.addCleanup
unittest.case.TestCase.addCleanup
unittest.doModuleCleanups
unittest.mock.MagicProxy.__call__
unittest.mock._MockIter.__iter__
weakref.WeakValueDictionary.__init__
weakref.WeakValueDictionary.update
weakref.getweakrefcount
Expand Down
19 changes: 19 additions & 0 deletions third_party/2and3/mock.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ from typing import Any, List, Optional, Text, Tuple, Type, TypeVar

_T = TypeVar("_T")

__all__ = [
'Mock',
'MagicMock',
'patch',
'sentinel',
'DEFAULT',
'ANY',
'call',
'create_autospec',
'AsyncMock',
'FILTER_DIR',
'NonCallableMock',
'NonCallableMagicMock',
'mock_open',
'PropertyMock',
'seal',
]
__version__: str

FILTER_DIR: Any

class _slotted: ...
Expand Down

0 comments on commit 31705fc

Please sign in to comment.