[issue2622] Import errors in email.message.py
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Apr 25 19:38:00 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
> But such a test doesn't belong in the test suite.
py2exe uses the "modulefinder" module to find dependencies.
I tried this command::
./python -m modulefinder Lib\email\message.py
And among the output, there is::
....
? email.Generator imported from __main__, email.message
? email.Iterators imported from __main__, email.message
....
It surely can be turned into a unit test. For example::
import email.message
filename = email.message.__file__
if filename.endswith(".pyc"):
filename = filename[:-1]
import modulefinder
mf=modulefinder.ModuleFinder()
mf.run_script(filename)
assert "email.Generator" not in mf.any_missing()
----------
nosy: +amaury.forgeotdarc
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2622>
__________________________________
More information about the Python-bugs-list
mailing list