diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-07 18:37:17 -0700 |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-07 18:37:17 -0700 |
commit | d5f92239818eef182fadc7c6f81f70912090573d (patch) | |
tree | 6ac89131eb8c69f3f2a752cbde3a6376f86f9454 /Lib/test/test_pkgutil.py | |
parent | 8e7cdb2586193726e0263eeec82c05f2a0d9c2c9 (diff) | |
download | cpython-git-d5f92239818eef182fadc7c6f81f70912090573d.tar.gz |
Issue #17211: Yield a namedtuple in pkgutil.
Patch by Ramchandra Apte.
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r-- | Lib/test/test_pkgutil.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index ae2aa1bcea..fc04dcfd7f 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -81,8 +81,9 @@ class PkgutilTests(unittest.TestCase): self.assertEqual(res2, RESOURCE_DATA) names = [] - for loader, name, ispkg in pkgutil.iter_modules([zip_file]): - names.append(name) + for moduleinfo in pkgutil.iter_modules([zip_file]): + self.assertIsInstance(moduleinfo, pkgutil.ModuleInfo) + names.append(moduleinfo.name) self.assertEqual(names, ['test_getdata_zipfile']) del sys.path[0] |