Fix mock patch.dict stub and add mock stub (#2173)

The dict stub was referring to an instance, not the type, leading to
__call__ being considered when using as a decorator, rather than
__init__.

mock is a backport of the stdlib module and should be defined the same.
This commit is contained in:
Robert Collins
2018-06-01 16:45:54 +12:00
committed by Jelle Zijlstra
parent a3031adb46
commit 98badb6eff
3 changed files with 184 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ consistent_files = [
{'stdlib/3/ntpath.pyi', 'stdlib/3/posixpath.pyi', 'stdlib/3/macpath.pyi', 'stdlib/3/posixpath.pyi'},
{'stdlib/3.4/enum.pyi', 'third_party/3/enum.pyi'},
{'stdlib/2/os/path.pyi', 'stdlib/3/os/path.pyi'},
{'stdlib/3/unittest/mock.pyi', 'third_party/2and3/mock.pyi'},
]
def main():