Staging
v0.5.1
https://github.com/python/cpython
Revision 28be388e69c6e88d5c04abcc714db5ec526e4f5e authored by Miss Islington (bot) on 06 June 2019, 10:39:30 UTC, committed by GitHub on 06 June 2019, 10:39:30 UTC

When an attribute is deleted from a Mock, a sentinel is added rather
than just deleting the attribute. This commit checks for such sentinels
when returning the child mocks in the __dir__ method as users won't
expect deleted attributes to appear when performing dir(mock).
(cherry picked from commit 0df635c7f8aa69e56a092bd4f142f0f164741ab2)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
1 parent f62a372
History
Tip revision: 28be388e69c6e88d5c04abcc714db5ec526e4f5e authored by Miss Islington (bot) on 06 June 2019, 10:39:30 UTC
Don't report deleted attributes in __dir__ (GHGH-10148)
Tip revision: 28be388
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.6 KB
.gitignore -rw-r--r-- 1.5 KB
.travis.yml -rw-r--r-- 6.1 KB
CODE_OF_CONDUCT.rst -rw-r--r-- 631 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 62.2 KB
README.rst -rw-r--r-- 9.9 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 491.6 KB
configure.ac -rw-r--r-- 163.7 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 42.2 KB
setup.py -rw-r--r-- 99.7 KB

README.rst

back to top