This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mailto1587
Recipients chepner, ezio.melotti, mailto1587, michael.foord, seanmccully, vstinner
Date 2015-12-01.11:40:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448970040.02.0.851048421296.issue22138@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-12-01 11:40:40mailto1587setrecipients: + mailto1587, vstinner, ezio.melotti, michael.foord, chepner, seanmccully
2015-12-01 11:40:40mailto1587setmessageid: <1448970040.02.0.851048421296.issue22138@psf.upfronthosting.co.za>
2015-12-01 11:40:40mailto1587linkissue22138 messages
2015-12-01 11:40:39mailto1587create