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 Eyal Posener
Recipients Eyal Posener
Date 2016-06-23.17:12:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466701937.33.0.949904358819.issue27376@psf.upfronthosting.co.za>
In-reply-to
Content
Add mock_import method.

A helper function to mask ``ImportError``s on a scoped code, using the ``with`` statement, or in method a method used as a decorator.
Failed imports will be ignored, unless specified by the *do_not_mock* argument.

The *do_not_mock* argument is a package or module name, or package or module names list. When specified, and imported in the scoped mocked code, importing them must succeed. If ``None`` (the default) then no import must succeed.
History
Date User Action Args
2016-06-23 17:12:17Eyal Posenersetrecipients: + Eyal Posener
2016-06-23 17:12:17Eyal Posenersetmessageid: <1466701937.33.0.949904358819.issue27376@psf.upfronthosting.co.za>
2016-06-23 17:12:17Eyal Posenerlinkissue27376 messages
2016-06-23 17:12:17Eyal Posenercreate