Xiadong Zhu added the comment:
How's the issue going on?
The situation to mock function's ``__defaults__`` attribute is general, as
default argument is determinate after function definition, when we need to test
a function such as:
def access_db(statement, backend=default_db_backend):
return default_db_backend.execute(statement)
that we must mock ``__defaults__`` attribute if we want to invoke it with
default backend.
It has one year past, though I could patch the ``_patch`` class but it's dirty,
is the issue a defect can be fixed or unsolvable?
--
nosy: +mailto1587
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22138>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com