summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test/import_/test_caching.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-02-07 01:15:27 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-02-07 01:15:27 (GMT)
commit2c318a1390e1a84c78d6f0cacaee1d21cc459234 (patch)
tree97f2579de870e21766febabe4acaaf53b8cd9eb9 /Lib/importlib/test/import_/test_caching.py
parent887b3f2625404f3835d47a63ae7e0ac4ee638cb6 (diff)
downloadcpython-2c318a1390e1a84c78d6f0cacaee1d21cc459234.zip
cpython-2c318a1390e1a84c78d6f0cacaee1d21cc459234.tar.gz
cpython-2c318a1390e1a84c78d6f0cacaee1d21cc459234.tar.bz2
Rewrite the code implementing __import__ for importlib. Now it is much simpler
and relies much more on meta path finders to abstract out various parts of import. As part of this the semantics for import_module tightened up and now follow __import__ much more closely (biggest thing is that the 'package' argument must now already be imported, else a SystemError is raised).
Diffstat (limited to 'Lib/importlib/test/import_/test_caching.py')
-rw-r--r--Lib/importlib/test/import_/test_caching.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/test/import_/test_caching.py b/Lib/importlib/test/import_/test_caching.py
index 3a895dc..e37c69a 100644
--- a/Lib/importlib/test/import_/test_caching.py
+++ b/Lib/importlib/test/import_/test_caching.py
@@ -64,7 +64,8 @@ class UseCache(unittest.TestCase):
with util.import_state(meta_path=[importer]):
module = import_util.import_('pkg', fromlist=['module'])
self.assert_(hasattr(module, 'module'))
- self.assertEquals(id(module.module), id(sys.modules['pkg.module']))
+ self.assertEquals(id(module.module),
+ id(sys.modules['pkg.module']))
def test_main():