Commit d7c65e28 authored by Michael Foord's avatar Michael Foord

Removed XXX from unittest.mock docstring and switch to a nicer try...except...finally

parent 30162be9
......@@ -619,9 +619,7 @@ class NonCallableMock(Base):
def __dir__(self):
"""Filter the output of `dir(mock)` to only useful members.
XXXX
"""
"""Filter the output of `dir(mock)` to only useful members."""
extras = self._mock_methods or []
from_type = dir(type(self))
from_dict = list(self.__dict__)
......@@ -1057,12 +1055,9 @@ class _patch(object):
@wraps(func)
def patched(*args, **keywargs):
# could use with statement here
extra_args = []
entered_patchers = []
# could use try..except...finally here
try:
try:
for patching in patched.patchings:
arg = patching.__enter__()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment