git.net

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

Need help: integrating unittest with setuptools


On Monday, 2 September 2019 04:44:29 UTC+10, YuXuan Dong  wrote:
> Hi, everybody:
> 
> I have met a problem while I ran `python setup.py test`:
> 
> 	unittest.case.SkipTest: No module named 'winreg'
> 
> I ran the command in MacOS and my project is written for only UNIX-like systems. I don't use any Windows-specified API. How dose `winreg` come here?
> 
> In my `setup.py`:
> 
> 		test_suite="test"
> 
> In my `test/test.py`:
> 
> 	import unittest
> 
> 	class TestAll(unittest.TestCase):
> 		def testall(self):
> 			return None
> 
> It works if I ran `python -m uniittest test.py` alone but raises the above exception if I ran `python setup.py test`.
> 
> I'm working on this for the whole day, searching for every keywords I can think of with Google but can't find why or how. Could you help me? Thanks.
> 
> --
> YX. D.

Does this help?
https://stackoverflow.com/questions/4320761/importerror-no-module-named-winreg-python3

Sayth