[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem while integrating unittest with setuptools

YuXuan Dong <yuxuan.dong at outlook.com> writes:
> I have uninstalled `six` using `pip uninstall six` but the problem is still there.

Your traceback shows that `six` does not cause your problem.
It is quite obvious that a `test_winreg` will want to load the
`wingreg` module.

> As you suggested, I have checked the traceback and found the exception is caused by `/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/test_winreg.py` on my machine with homebrew-installed Python3.
> I have realized that the problem may be caused of `test-suite=test` in my `setup.py`. `setuptools` will find the `test` package. But the package it found is not in my project. It found `/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test`.

Yes. Apparently, you run the Python test suite - and depending on
platform and available infrastructure some of its tests fail.

In my package `dm.xmlsec.binding` I use
Maybe, you can ensure to get the correct test suite in a similar
way for your package.