Nick Coghlan added the comment: OK, I thought that iter_importers was at least being tested indirectly by the tests for walk_packages: http://hg.python.org/cpython/file/default/Lib/test/test_runpy.py#l417
However, it turns out that iter_modules() only calls iter_importers() if you don't supply an explicit path, and walk_packages() always passes an explicit path down. I suggest looking at the walk_packages test for ideas on devising a better functional test for iter_importers. Testing iter_modules directly would be good, too. (Note: There's a series of patches from Chris to move the walk_packages test to where it belongs in test_pkgutil, but they won't be applied until after the final 3.2 maintenance release has happened. Moving the test requires some fairly significant rearranging of the test suite to get the required helper functions out of test_runpy and into a shared, discoverable, location) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16163> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com