summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2009-02-08 03:37:27 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2009-02-08 03:37:27 (GMT)
commit9a1d6e3022c8eb3cc3b05a30ea975da971bd5938 (patch)
tree14c1d51e518f7ea189700355f1b2a004baf1e871 /Lib/test/test_zipimport.py
parent3f48ae35c710c5e5101d5de6721b1e2ccb56df68 (diff)
downloadcpython-9a1d6e3022c8eb3cc3b05a30ea975da971bd5938.zip
cpython-9a1d6e3022c8eb3cc3b05a30ea975da971bd5938.tar.gz
cpython-9a1d6e3022c8eb3cc3b05a30ea975da971bd5938.tar.bz2
Merged revisions 69425 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69425 | nick.coghlan | 2009-02-08 13:17:00 +1000 (Sun, 08 Feb 2009) | 1 line Issue #4512 closeout: Make ZipImport.get_filename() a public method ........
Diffstat (limited to 'Lib/test/test_zipimport.py')
-rw-r--r--Lib/test/test_zipimport.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 5637467..f41deaf 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -212,7 +212,7 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
self.assertEquals(zi.archive, TEMP_ZIP)
self.assertEquals(zi.is_package(TESTPACK), True)
mod = zi.load_module(TESTPACK)
- self.assertEquals(zi._get_filename(TESTPACK), mod.__file__)
+ self.assertEquals(zi.get_filename(TESTPACK), mod.__file__)
self.assertEquals(zi.is_package(packdir + '__init__'), False)
self.assertEquals(zi.is_package(packdir + TESTPACK2), True)
@@ -224,11 +224,11 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
mod = sys.modules[mod_name]
self.assertEquals(zi.get_source(TESTPACK), None)
self.assertEquals(zi.get_source(mod_path), None)
- self.assertEquals(zi._get_filename(mod_path), mod.__file__)
+ self.assertEquals(zi.get_filename(mod_path), mod.__file__)
# To pass in the module name instead of the path, we must use the right importer
loader = mod.__loader__
self.assertEquals(loader.get_source(mod_name), None)
- self.assertEquals(loader._get_filename(mod_name), mod.__file__)
+ self.assertEquals(loader.get_filename(mod_name), mod.__file__)
# test prefix and archivepath members
zi2 = zipimport.zipimporter(TEMP_ZIP + os.sep + TESTPACK)
@@ -257,7 +257,7 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
self.assertEquals(zi.prefix, packdir)
self.assertEquals(zi.is_package(TESTPACK2), True)
mod = zi.load_module(TESTPACK2)
- self.assertEquals(zi._get_filename(TESTPACK2), mod.__file__)
+ self.assertEquals(zi.get_filename(TESTPACK2), mod.__file__)
self.assertEquals(zi.is_package(TESTPACK2 + os.sep + '__init__'), False)
self.assertEquals(zi.is_package(TESTPACK2 + os.sep + TESTMOD), False)
@@ -268,11 +268,11 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
mod = sys.modules[mod_name]
self.assertEquals(zi.get_source(TESTPACK2), None)
self.assertEquals(zi.get_source(mod_path), None)
- self.assertEquals(zi._get_filename(mod_path), mod.__file__)
+ self.assertEquals(zi.get_filename(mod_path), mod.__file__)
# To pass in the module name instead of the path, we must use the right importer
loader = mod.__loader__
self.assertEquals(loader.get_source(mod_name), None)
- self.assertEquals(loader._get_filename(mod_name), mod.__file__)
+ self.assertEquals(loader.get_filename(mod_name), mod.__file__)
finally:
z.close()
os.remove(TEMP_ZIP)