Problem while integrating unittest with setuptools

dieter dieter at handshake.de
Mon Sep 2 01:05:14 EDT 2019


YuXuan Dong <yuxuan.dong at outlook.com> writes:
> I met a problem while I ran `python setup.py test`: 
>
> 	unittest.case.SkipTest: No module named 'winreg'
> ... no windows modules should be necessary ...

I know apparently unexplainable "no module named ..." messages as
a side effect of the use of "six".

"six" is used to facilitate the development of components usable
for both Python 2 and Python 3. Among others, it contains the
module "six.moves" which uses advance Python features to allow
the import of Python modules from different locations in the
package hierarchy and also handles name changes. This can
confuse other components using introspection (they see
modules in "six.move" which are not really available).

To find out if something like this is the cause of your problem,
please try to get a traceback. It might be necessary to
use a different test runner for this (I like much "zope.testrunner"
and my wrapper "dm.zopepatches.ztest").




More information about the Python-list mailing list