summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_api.py
Commit message (Collapse)AuthorAgeFilesLines
* Closes issue #18698: ensure importlib.reload() returns the module out of ↵Eric Snow2013-08-151-0/+16
| | | | sys.modules.
* Issue #17177: stop using imp in test_importlibBrett Cannon2013-06-151-5/+5
|
* Issue #18193: Add importlib.reload(), documenting (but notBrett Cannon2013-06-141-0/+12
| | | | | | implementing in code) the deprecation of imp.reload(). Thanks to Berker Peksag for the patch.
* #17115,17116: Have modules initialize the __package__ and __loader__Brett Cannon2013-05-041-8/+6
| | | | | | | | | | | | | | | | | attributes to None. The long-term goal is for people to be able to rely on these attributes existing and checking for None to see if they have been set. Since import itself sets these attributes when a loader does not the only instances when the attributes are None are from someone overloading __import__() and not using a loader or someone creating a module from scratch. This patch also unifies module initialization. Before you could have different attributes with default values depending on how the module object was created. Now the only way to not get the same default set of attributes is to circumvent initialization by calling ModuleType.__new__() directly.
* Issue #17099: Have importlib.find_loader() raise ValueError whenBrett Cannon2013-03-131-0/+14
| | | | | | __loader__ is not set on a module. This brings the exception in line with when __loader__ is None (which is equivalent to not having the attribute defined).
* merge w/ 3.3Brett Cannon2013-02-031-6/+0
|\
| * Way too many places create modules temporarily that never setBrett Cannon2013-02-031-6/+0
| | | | | | | | | | | | __loader__ for this test to succeed without a major changes. It also doesn't test the original issue of modules imported by Py_Initialize() having __loader__ set (the rest of the test covers that).
* | mergeBrett Cannon2013-02-031-0/+4
|\ \ | |/
| * pyexpat/xml.parsers.expat create their errors and model modules fromBrett Cannon2013-02-031-0/+4
| | | | | | | | | | | | scratch. This means they do not set __loader__ by default. This is acceptable under importlib/PEP 302 definitions, so relax the test that was trying to apply this universally.
* | Merge w/ 3.3 more fixes thanks to issue #17098Brett Cannon2013-02-011-0/+9
|\ \ | |/
| * Issue #17098: Be more stringent of setting __loader__ on early importedBrett Cannon2013-02-011-0/+6
| | | | | | | | modules. Also made test more rigorous.
* | merge with 3.3Brett Cannon2013-02-011-7/+10
|\ \ | |/
| * Add a test for fix of issue #17098Brett Cannon2013-02-011-1/+12
|/
* Issue #15502: Finish bringing importlib.abc in line with the currentBrett Cannon2012-08-101-3/+7
| | | | | | | | | state of the import system. Also make importlib.invalidate_caches() work with sys.meta_path instead of sys.path_importer_cache to completely separate the path-based import system from the overall import system. Patch by Eric Snow.
* Issue #15168: Move importlb.test to test.test_importlib.Brett Cannon2012-07-201-0/+183
This should make the Linux distros happy as it is now easier to leave importlib's tests out of their base Python distribution.