diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-05 06:42:44 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-05 06:42:44 (GMT) |
commit | 515a74fbf9c5eb6a5dbc7cbbb5b3910eab966466 (patch) | |
tree | f6412d90558e5840ca1d8803cc01f14733ce46a4 /Lib/test/test_pkgutil.py | |
parent | 2fef5b4a83f274dfe1a1b44be735b66913541cbe (diff) | |
download | cpython-515a74fbf9c5eb6a5dbc7cbbb5b3910eab966466.zip cpython-515a74fbf9c5eb6a5dbc7cbbb5b3910eab966466.tar.gz cpython-515a74fbf9c5eb6a5dbc7cbbb5b3910eab966466.tar.bz2 |
Issue 4005: Remove .sort() call on dict_keys object.
This caused pydoc to fail when there was a zip file in sys.path.
Patch contributed by Amaury Forgeot d'Arc.
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r-- | Lib/test/test_pkgutil.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index 169ef66..f69af5a 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -74,6 +74,12 @@ class PkgutilTests(unittest.TestCase): self.assertEqual(res1, RESOURCE_DATA) res2 = pkgutil.get_data(pkg, 'sub/res.txt') self.assertEqual(res2, RESOURCE_DATA) + + names = [] + for loader, name, ispkg in pkgutil.iter_modules([zip_file]): + names.append(name) + self.assertEqual(names, ['test_getdata_zipfile']) + del sys.path[0] del sys.modules[pkg] |