mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#8942: add test for __path__ contents in zipimport tests
Patch by Tatiana Al-Chueyr.
This commit is contained in:
parent
2b695a4678
commit
a9719057a2
1 changed files with 4 additions and 0 deletions
|
@ -205,6 +205,10 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
|
|||
mod = zi.load_module(TESTPACK)
|
||||
self.assertEqual(zi.get_filename(TESTPACK), mod.__file__)
|
||||
|
||||
existing_pack_path = __import__(TESTPACK).__path__[0]
|
||||
expected_path_path = os.path.join(TEMP_ZIP, TESTPACK)
|
||||
self.assertEqual(existing_pack_path, expected_path_path)
|
||||
|
||||
self.assertEqual(zi.is_package(packdir + '__init__'), False)
|
||||
self.assertEqual(zi.is_package(packdir + TESTPACK2), True)
|
||||
self.assertEqual(zi.is_package(packdir2 + TESTMOD), False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue