mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
#1325: Add docs and tests for zipimporter.archive and zipimporter.prefix.
This commit is contained in:
parent
516787dd98
commit
e260ba2d33
2 changed files with 34 additions and 18 deletions
|
@ -223,6 +223,11 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
|
|||
mod = __import__(module_path_to_dotted_name(mod_name))
|
||||
self.assertEquals(zi.get_source(TESTPACK), None)
|
||||
self.assertEquals(zi.get_source(mod_name), None)
|
||||
|
||||
# test prefix and archivepath members
|
||||
zi2 = zipimport.zipimporter(TEMP_ZIP + os.sep + TESTPACK)
|
||||
self.assertEquals(zi2.archive, TEMP_ZIP)
|
||||
self.assertEquals(zi2.prefix, TESTPACK + os.sep)
|
||||
finally:
|
||||
z.close()
|
||||
os.remove(TEMP_ZIP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue