Message255648
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? |
|
Date |
User |
Action |
Args |
2015-12-01 11:40:40 | mailto1587 | set | recipients:
+ mailto1587, vstinner, ezio.melotti, michael.foord, chepner, seanmccully |
2015-12-01 11:40:40 | mailto1587 | set | messageid: <1448970040.02.0.851048421296.issue22138@psf.upfronthosting.co.za> |
2015-12-01 11:40:40 | mailto1587 | link | issue22138 messages |
2015-12-01 11:40:39 | mailto1587 | create | |
|